mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-04 21:39:49 +00:00
Move npm install into its own docker stage (#999)
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -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 /
|
||||||
@@ -54,9 +58,9 @@ RUN apt-get clean && apt-get -y update && apt-get -y install --no-install-recomm
|
|||||||
|
|
||||||
# install debug tools for testing environment
|
# install debug tools for testing environment
|
||||||
RUN if [ "$INSTALL_DEBUG" ] ; then \
|
RUN if [ "$INSTALL_DEBUG" ] ; then \
|
||||||
apt-get -y update && apt-get -y install --no-install-recommends \
|
apt-get -y update && apt-get -y install --no-install-recommends \
|
||||||
vim htop bmon net-tools iputils-ping procps lsof \
|
vim htop bmon net-tools iputils-ping procps lsof \
|
||||||
&& pip install --user ipython pytest pytest-django \
|
&& pip install --user ipython pytest pytest-django \
|
||||||
; fi
|
; fi
|
||||||
|
|
||||||
# make folders
|
# make folders
|
||||||
|
|||||||
Reference in New Issue
Block a user