parent
15f607122f
commit
5df1f2f23b
@ -1,9 +1,22 @@ |
|||||||
#stage 1 |
# Stage 1 |
||||||
FROM node:latest as node |
|
||||||
|
|
||||||
|
FROM node:16-alpine3.14 as build-step |
||||||
|
|
||||||
|
RUN mkdir -p /app |
||||||
|
|
||||||
WORKDIR /app |
WORKDIR /app |
||||||
COPY . . |
|
||||||
|
COPY package.json /app |
||||||
|
|
||||||
RUN npm install |
RUN npm install |
||||||
|
|
||||||
|
COPY . /app |
||||||
|
|
||||||
RUN npm run build --prod |
RUN npm run build --prod |
||||||
#stage 2 |
|
||||||
FROM nginx:alpine |
# Stage 2 |
||||||
COPY --from=node /app/dist/demo-app /usr/share/nginx/html |
|
||||||
|
FROM nginx:1.17.1-alpine |
||||||
|
|
||||||
|
COPY --from=build-step /app/dist/Collaborateur-Epa-Front /usr/share/nginx/html |
||||||
|
Loading…
Reference in new issue