Dockerfile 548 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
ARG basePath
9
RUN node --max_old_space_size=15360 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}