argos/dmp-frontend/Dockerfile

18 lines
546 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
2018-06-27 12:29:21 +02:00
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-10-02 16:33:58 +02:00
COPY --from=angular /app/static/ /usr/share/nginx/static
2018-07-11 15:47:36 +02:00
COPY ./nginx-custom.conf /etc/nginx/conf.d/default.conf