From 54ff777532f1acf6ab77e9deb3e3b7e5c201107d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Wed, 20 Apr 2022 18:59:54 +0200 Subject: [PATCH] Add healthcheck to Dockerfile --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index b966287..501acd1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,5 +7,7 @@ COPY . . RUN go build -o minipaste minipaste.go FROM alpine:latest +RUN apk add --no-cache curl COPY --from=builder /app/minipaste /usr/bin/minipaste +HEALTHCHECK --interval=10s --start-period=5s CMD curl --fail http://localhost:8080 || exit 1 CMD ["/usr/bin/minipaste"] \ No newline at end of file