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
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:
parent
f39f1f55df
commit
4773b31108
1 changed files with 15 additions and 5 deletions
|
|
@ -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 ----------
|
||||
FROM docker.io/node:20-alpine AS builder
|
||||
WORKDIR /app
|
||||
|
||||
# Clean any existing cache before starting
|
||||
RUN npm cache clean --force
|
||||
# Copy production dependencies from deps stage
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
|
||||
# install deps (needs dev deps for build)
|
||||
# Copy package files
|
||||
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 . .
|
||||
|
||||
# disable telemetry; let Next control NODE_ENV during build
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue