argos/dmp-frontend/Dockerfile.CI

31 lines
611 B
Docker
Raw Normal View History

2020-09-24 16:20:33 +02:00
# stage1 as builder
FROM node:12-alpine as builder
# copy the package.json to install dependencies
COPY package.json ./
# Install the dependencies and make the folder
RUN npm install && mkdir /src && mv ./node_modules ./src
WORKDIR /src
COPY . .
# Build the project and copy the files
RUN npm run ng build -- --deploy-url=/ --prod
FROM nginx:alpine
#!/bin/sh
COPY nginx.conf.CI /etc/nginx/nginx.conf
## Remove default nginx index page
RUN rm -rf /usr/share/nginx/html/*
# Copy from the stahg 1
COPY --from=builder /src/dist /usr/share/nginx/html
EXPOSE 8080
ENTRYPOINT ["nginx", "-g", "daemon off;"]