mirror of
https://github.com/simple-login/app.git
synced 2025-09-05 22:24:43 +08:00
Install npm packages in Dockerfile
This commit is contained in:
parent
cb2c6af4e4
commit
dab0a26cc3
1 changed files with 10 additions and 1 deletions
11
Dockerfile
11
Dockerfile
|
@ -1,11 +1,20 @@
|
|||
FROM python:3.7
|
||||
# Install npm packages
|
||||
FROM node:10.17.0-alpine AS npm
|
||||
WORKDIR /code
|
||||
COPY ./static/package*.json /code/static/
|
||||
RUN cd /code/static && npm install
|
||||
|
||||
|
||||
FROM python:3.7
|
||||
WORKDIR /code
|
||||
|
||||
# install dependencies
|
||||
COPY ./requirements.txt ./
|
||||
RUN pip3 install --no-cache-dir -r requirements.txt
|
||||
|
||||
# copy npm packages
|
||||
COPY --from=npm /code /code
|
||||
|
||||
# copy everything else into /code
|
||||
COPY . .
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue