Merge pull request #2504 from ebuildy/patch-1

Add healthcheck url env variable
This commit is contained in:
David Ashpole 2020-04-21 14:20:31 -07:00 committed by GitHub
commit b1312d39fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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"]