# Stage 1 : Building the application FROM node:16-alpine3.14 as build-step RUN mkdir -p /app WORKDIR /app COPY . /app RUN npm install RUN npm run build --prod # Stage 2 : Deploying the application on Nginx FROM nginx:1.17.1-alpine RUN rm -rf /usr/share/nginx/html/* && rm -rf /etc/nginx/nginx.conf COPY ./nginx.conf /etc/nginx/nginx.conf COPY --from=build-step /app/dist/Collaborateur-Epa-Front /usr/share/nginx/html