Remove unnecessary files during frontend build
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 58s
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 58s
Podman Rootless Demo / deploy-prod (push) Has been skipped
This commit is contained in:
parent
68873ec424
commit
b5972d34cf
1 changed files with 3 additions and 1 deletions
|
|
@ -4,7 +4,7 @@ WORKDIR /app
|
|||
|
||||
# install deps (needs dev deps for build)
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
RUN npm ci && npm cache clean --force
|
||||
|
||||
# app source
|
||||
COPY . .
|
||||
|
|
@ -19,6 +19,8 @@ ENV NEXT_PUBLIC_API_HOST=${NEXT_PUBLIC_API_HOST}
|
|||
ENV NEXT_PUBLIC_API_PORT=${NEXT_PUBLIC_API_PORT}
|
||||
|
||||
RUN npm run build
|
||||
# Clean up unnecessary files to save space after build
|
||||
RUN rm -rf node_modules .next/cache
|
||||
|
||||
# ---------- runner (standalone) ----------
|
||||
FROM docker.io/node:20-alpine AS runner
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue