From 48af0c7e1839fc73ba24f5f5fe450c528d187465 Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Tue, 14 Jul 2020 16:51:38 -0700 Subject: [PATCH] Add healthcheck --- Dockerfile | 5 +++++ README.md | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/Dockerfile b/Dockerfile index fabaa44..beeff25 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,5 +8,10 @@ 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"] diff --git a/README.md b/README.md index 6724edd..b92f8e0 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ # cadvisor-multi-arch A multi-arch build script for generating arm images of cadvisor + +## Note + +This does not include `libpfm` or `netgo`, which the upstream does include.