Add healthcheck to Dockerfile

This commit is contained in:
Torjus Håkestad 2022-04-20 18:59:54 +02:00
parent f5de660a4c
commit 54ff777532

View File

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