cadvisor-multi-arch/Dockerfile

18 lines
538 B
Docker

ARG REPO=library
FROM multiarch/qemu-user-static:4.2.0-2 as qemu-user-static
FROM ${REPO}/alpine:3.10
# Copying all qemu files because amd64 doesn't exist and cannot condional copy
COPY --from=qemu-user-static /usr/bin/qemu-* /usr/bin/
ARG GOARCH=amd64
COPY ./cadvisor-${GOARCH} /usr/bin/cadvisor
ENV CADVISOR_HEALTHCHECK_URL=http://localhost:8080/healthz
HEALTHCHECK --interval=30s --timeout=3s \
CMD wget --quiet --tries=1 --spider $CADVISOR_HEALTHCHECK_URL || exit 1
EXPOSE 8080
ENTRYPOINT ["/usr/bin/cadvisor", "-logtostderr"]