Dockerfile 547 Bytes
Newer Older
1
2
3
4
5
6
7
### STAGE 1: Build ###
FROM node:12.7-alpine AS build
WORKDIR /usr/src/app
COPY package.json package-lock.json ./
RUN npm install
COPY . .
ARG configuration
8
9
ARG basePath
RUN node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng build --configuration $configuration --base-href=$basePath
10
11
12
13
14

### STAGE 2: Run ###
FROM nginx:1.17.1-alpine
COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=build /usr/src/app/dist/webin-portal /usr/share/nginx/html
15
16
ARG basePath
COPY --from=build /usr/src/app/dist/webin-portal /usr/share/nginx/html${basePath}