Files
deepstock/Dockerfile
Dorian 97cc44a22e fix: repair lockfile sync and bump Docker Node for Vite 8
npm ci failed in the Portainer build: the lockfile had inconsistent
@emnapi native-binding entries. Regenerated package-lock.json so
'npm ci' is clean. Also bump the build image to node 22.12.0, the
minimum Vite 8 requires (22.11 was below its engines floor).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 14:58:22 +01:00

20 lines
709 B
Docker

# syntax=docker/dockerfile:1.7
# Pin both stages to specific Alpine-based releases. Recommend layering
# `@sha256:<digest>` in Portainer's stack editor for full digest pinning.
# Node >=22.12.0 required by Vite 8 (engines field); 22.11 fails the build.
FROM node:22.12.0-alpine3.20 AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci --no-audit --no-fund
COPY . .
RUN npm run build
FROM nginx:1.27.2-alpine3.20 AS runtime
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget -q --spider http://127.0.0.1/ || exit 1
CMD ["nginx", "-g", "daemon off;"]