argos/dmp-frontend/Dockerfile

16 lines
488 B
Docker
Raw Normal View History

2018-06-27 12:29:21 +02:00
FROM johnpapa/angular-cli as angular
WORKDIR /app
COPY package.json /app/
RUN npm cache clear --force && npm install
COPY ./ /app/
ARG env=dev
ARG aot=--no-aot
2018-07-11 15:47:36 +02:00
RUN echo $env
RUN echo $aot
RUN if [ "$env" = "prod" ]; then ng build --$env --$aot; else ng build --$aot; fi
2018-06-27 12:29:21 +02:00
# Stage 1, based on Nginx, to have only the compiled app, ready for production with Nginx
FROM nginx:1.13
COPY --from=angular /app/dist/ /usr/share/nginx/html
2018-07-11 15:47:36 +02:00
COPY ./nginx-custom.conf /etc/nginx/conf.d/default.conf