You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
argos/dmp-frontend/Dockerfile

33 lines
619 B
Docker

# stage1 as builder
FROM node:12-alpine as builder
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
RUN npm run ng build -- --deploy-url=/ --prod
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
COPY --from=builder /page/dist /usr/share/nginx/html
EXPOSE 4200
ENTRYPOINT ["nginx", "-g", "daemon off;", "-p", "/usr/share/nginx"]