docker multistage && image version
This commit is contained in:
parent
9c7f57bebd
commit
4e6fc3eb63
14
Dockerfile
14
Dockerfile
@ -1,10 +1,20 @@
|
||||
FROM node:alpine
|
||||
# Stage 1 testing
|
||||
FROM node:13.10.1-alpine
|
||||
|
||||
COPY package.json /data/
|
||||
COPY src /data/src
|
||||
COPY public /data/public
|
||||
|
||||
RUN cd /data && npm i
|
||||
RUN cd /data && npm i && npm test
|
||||
|
||||
# Stage 2 package
|
||||
FROM node:13.10.1-alpine
|
||||
|
||||
COPY package.json /data/
|
||||
COPY src /data/src
|
||||
COPY public /data/public
|
||||
|
||||
RUN cd /data && npm i --only=production
|
||||
|
||||
WORKDIR /data
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user