From 9f3a741a49865ec51edc8cf275530f4e1e3b677d Mon Sep 17 00:00:00 2001 From: Aleks Lozovyuk Date: Fri, 3 Jan 2025 14:22:29 +0300 Subject: [PATCH] Update Dockerfile Add curl deps, add healthcheck --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9936eead..ef13ca03 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ RUN go build . FROM alpine:3.21 -RUN apk update && apk upgrade +RUN apk update && apk upgrade && apk add --no-cache curl WORKDIR /opt @@ -21,4 +21,6 @@ COPY --from=build /opt/LICENSE . EXPOSE 9121/tcp +HEALTHCHECK --interval=30s --timeout=1s --start-period=5s --retries=3 CMD curl --fail -s http://localhost:9121/health | grep 'ok' || exit 1 + ENTRYPOINT [ "/kvrocks_exporter" ]