argos/dmp-frontend/Dockerfile

33 lines
604 B
Docker
Raw Permalink Normal View History

2020-04-27 15:21:03 +02:00
# stage1 as builder
2020-05-13 15:32:01 +02:00
FROM node:12-alpine AS BUILDER
2020-04-27 15:21:03 +02:00
WORKDIR /page
# copy the package.json to install dependencies
COPY package.json /page
# Install the dependencies and make the folder
RUN npm install
COPY . /page
# Build the project and copy the files
2021-01-22 09:32:07 +01:00
RUN npm run ng build -- --prod
2020-04-27 15:21:03 +02:00
FROM nginx:alpine
#!/bin/sh
COPY nginx.conf /etc/nginx
COPY mime.types /etc/nginx
## Remove default nginx index page
RUN rm -rf /usr/share/nginx/html/*
# Copy from the stahg 1
2020-05-13 15:32:01 +02:00
COPY --from=BUILDER /page/dist /usr/share/nginx/html
2020-04-27 15:21:03 +02:00
EXPOSE 4200
ENTRYPOINT ["nginx", "-g", "daemon off;", "-p", "/usr/share/nginx"]