Try something else to save space
Some checks failed
Podman Rootless Demo / test-backend (push) Has been skipped
Podman Rootless Demo / test-frontend (push) Successful in 11s
Podman Rootless Demo / build-backend (push) Has been skipped
Podman Rootless Demo / build-frontend (push) Failing after 45s
Podman Rootless Demo / deploy-prod (push) Has been skipped

This commit is contained in:
continuist 2025-09-21 13:18:19 -04:00
parent f39f1f55df
commit 4773b31108

View file

@ -1,15 +1,25 @@
# ---------- deps ----------
FROM docker.io/node:20-alpine AS deps
WORKDIR /app
# Install only dependencies first
COPY package*.json ./
RUN npm install --production --no-audit --no-fund
# ---------- build ---------- # ---------- build ----------
FROM docker.io/node:20-alpine AS builder FROM docker.io/node:20-alpine AS builder
WORKDIR /app WORKDIR /app
# Clean any existing cache before starting # Copy production dependencies from deps stage
RUN npm cache clean --force COPY --from=deps /app/node_modules ./node_modules
# install deps (needs dev deps for build) # Copy package files
COPY package*.json ./ COPY package*.json ./
RUN npm cache clean --force && npm install --prefer-offline --no-audit --no-fund && npm cache clean --force
# app source # Install dev dependencies
RUN npm install --only=dev --no-audit --no-fund
# Copy app source
COPY . . COPY . .
# disable telemetry; let Next control NODE_ENV during build # disable telemetry; let Next control NODE_ENV during build