Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upmulti arch docker images #3619
Comments
This comment has been minimized.
This comment has been minimized.
vielmetti
commented
Dec 24, 2017
|
Agreed. Looping @tianon in on this too. |
This comment has been minimized.
This comment has been minimized.
tianon
commented
Dec 27, 2017
|
I've had success with something like the following, but it requires building natively on all platforms: (which we'd be happy to help with if Prometheus wanted to participate in https://github.com/docker-library/official-images, which we'd also be happy to help facilitate) FROM alpine:3.7
WORKDIR /opt/prometheus
ENV PATH /opt/prometheus:$PATH
# https://github.com/prometheus/prometheus/releases
ENV PROMETHEUS_VERSION 2.0.0
RUN set -ex; \
\
apk add --no-cache --virtual .fetch-deps \
ca-certificates \
libressl \
; \
\
apkArch="$(apk --print-arch)"; \
case "$apkArch" in \
aarch64) promArch='arm64' ;; \
armhf) promArch='armv6' ;; \
ppc64le) promArch='ppc64le' ;; \
s390x) promArch='s390x' ;; \
x86) promArch='386' ;; \
x86_64) promArch='amd64' ;; \
esac; \
\
wget -O /tmp/prom.tar.gz "https://github.com/prometheus/prometheus/releases/download/v${PROMETHEUS_VERSION}/prometheus-${PROMETHEUS_VERSION}.linux-${promArch}.tar.gz"; \
tar \
--extract \
--file /tmp/prom.tar.gz \
--strip-components 1 \
--verbose \
; \
rm /tmp/prom.tar.gz; \
\
prometheus --version; \
\
apk del .fetch-deps
VOLUME /opt/prometheus/data
EXPOSE 9090
CMD ["prometheus"]Otherwise, this should be pretty easy to accomplish with either cross-building (like what I believe that CoreDNS makefile is doing) or even multi-stage builds (perhaps with an FROM alpine:3.7 AS download
ARG arch=amd64
RUN apk add --no-cache libressl ca-certificates && wget "...-linux.$arch..." # ...
ARG from=amd64/alpine:3.7
FROM $from
COPY --from=download /path/to/prometheus /path/
CMD ["prometheus"]then building via |
vielmetti
referenced this issue
Jan 4, 2018
Closed
multiarch support for Docker official image #3203
This comment has been minimized.
This comment has been minimized.
|
prometheus/promu#89 is where to discuss this. |
brian-brazil
closed this
Mar 20, 2018
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 22, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
miekg commentedDec 24, 2017
It seems the docker images on hub.docker are only for amd64.
It would be nice to make them multiarch and add support for: arm, arm64, ppc, s390x.
We've done with in CoreDNS, see https://github.com/coredns/coredns/blob/master/Makefile.release