Skip to content

Commit 0c2c6c4

Browse files
authored
Add healthcheck in Dockerfile (#812)
1 parent 461758b commit 0c2c6c4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

common/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ FROM $BUILD_FROM as base
44
ENV LANG C.UTF-8
55
ARG BUILD_VERSION
66

7-
RUN apk add --no-cache socat tini nodejs eudev
7+
RUN apk add --no-cache socat tini nodejs eudev && \
8+
# Validation to confirm that curl is installed in the base image.
9+
curl --version || (echo "curl missing" && exit 1)
810

911
# Dependencies and build
1012
FROM base as dependencies_and_build
@@ -49,4 +51,7 @@ COPY --from=dependencies_and_build /app/package.json /app/LICENSE /app/index.js
4951

5052
ENV NODE_ENV production
5153

54+
HEALTHCHECK --interval=1m --timeout=3s \
55+
CMD curl -f http://localhost:8099/
56+
5257
ENTRYPOINT [ "/sbin/tini", "--", "/docker-entrypoint.sh"]

0 commit comments

Comments
 (0)