From 511848b406f4b4995e86be81341354e9b569a7c1 Mon Sep 17 00:00:00 2001 From: aceberg <1502200+aceberg@users.noreply.github.com> Date: Fri, 30 Jun 2023 21:51:15 +0700 Subject: [PATCH] Docker healthcheck --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index bdd4384..fb9dc34 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,9 +9,12 @@ FROM alpine WORKDIR /app -RUN apk add --no-cache tzdata arp-scan \ +RUN apk add --no-cache arp-scan curl tzdata \ && mkdir /data COPY --from=builder /WatchYourLAN /app/ +HEALTHCHECK --interval=5m --timeout=3s \ + CMD curl -f http://localhost:8840 || exit 1 + ENTRYPOINT ["./WatchYourLAN"] \ No newline at end of file