Add healthcheck url env variable

This commit is contained in:
Thomas Decaux 2020-04-21 17:29:38 +02:00
parent 74b513b790
commit 0d6dad07e6

View File

@ -11,7 +11,9 @@ ADD cadvisor /usr/bin/cadvisor
EXPOSE 8080
ENV CADVISOR_HEALTHCHECK_URL=http://localhost:8080/healthz
HEALTHCHECK --interval=30s --timeout=3s \
CMD wget --quiet --tries=1 --spider http://localhost:8080/healthz || exit 1
CMD wget --quiet --tries=1 --spider $CADVISOR_HEALTHCHECK_URL || exit 1
ENTRYPOINT ["/usr/bin/cadvisor", "-logtostderr"]