The wget probe failed because nginx listens on IPv4 only while BusyBox wget resolved localhost to ::1 first, returning Connection refused despite a healthy nginx. A static SPA needs no liveness probe beyond the container's running state; remove the HEALTHCHECK entirely.
18 lines
287 B
Docker
18 lines
287 B
Docker
FROM node:22-alpine AS builder
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
RUN npm ci
|
|
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
FROM nginx:1.27-alpine AS runner
|
|
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
|
|
|
EXPOSE 80
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|