From 6cbf8448c16e36606569b522a881151a4f8490f1 Mon Sep 17 00:00:00 2001 From: Vivek Date: Sun, 31 May 2026 06:49:14 +0000 Subject: [PATCH] Fix: install curl for healthcheck, wget uses IPv6 on alpine --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5f75033..e34a068 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ FROM node:22-alpine +RUN apk add --no-cache curl + WORKDIR /app COPY webapp/package.json webapp/package-lock.json ./ @@ -11,7 +13,7 @@ COPY webapp/.env ./.env ENV NODE_ENV=production EXPOSE 3000 -HEALTHCHECK --interval=30s --timeout=3s --start-period=10s \ - CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:3000/health || exit 1 +HEALTHCHECK --interval=10s --timeout=3s --start-period=10s --retries=3 \ + CMD curl -f http://127.0.0.1:3000/health || exit 1 CMD ["node", "src/server.js"]