Move npm install into its own docker stage (#999)

This commit is contained in:
Craig Alexander
2025-06-20 12:33:43 -04:00
committed by GitHub
parent bb4e5ecb50
commit 990cb9aaec

View File

@@ -1,14 +1,18 @@
# multi stage to build tube archivist # multi stage to build tube archivist
# build python wheel, download and extract ffmpeg, copy into final image # build python wheel, download and extract ffmpeg, copy into final image
FROM node:lts-alpine AS npm-builder
COPY frontend/package.json frontend/package-lock.json /
RUN npm i
FROM node:lts-alpine AS node-builder FROM node:lts-alpine AS node-builder
# RUN npm config set registry https://registry.npmjs.org/ # RUN npm config set registry https://registry.npmjs.org/
COPY --from=npm-builder ./node_modules /frontend/node_modules
COPY ./frontend /frontend COPY ./frontend /frontend
WORKDIR /frontend WORKDIR /frontend
RUN npm i
RUN npm run build:deploy RUN npm run build:deploy
WORKDIR / WORKDIR /