-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (30 loc) · 1016 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# STAGE 1: Setup
############################################
# FROM --platform=linux/amd64 node:16-alpine AS setup
FROM node:16-alpine AS setup
LABEL maintainer="[email protected]"
COPY ./angular.json /app/angular.json
COPY ./package.json /app/package.json
WORKDIR /app
RUN apk update && \
apk add --update --no-cache python3 make g++ && \
export PYTHON=/usr/bin/python3 && \
npm install
# npm install -g @angular/cli@latest && \
# npm install http-server -g
# STAGE 2: Build
############################################
FROM setup AS build
COPY . /app
# ARG API_BASE="http://localhost:3000"
# ARG API_BASE="https://0.0.0.0:8000"
ARG CONFIG=production
# RUN export API_BASE=$API_BASE && \
# npm run ng run Weather-Wise-Client:collect-vars
RUN npm run ng build -- --output-path=dist/ --configuration=${CONFIG}
# STAGE 3: Final
############################################
FROM setup AS final
COPY --from=build /app/dist/ /app/dist/
VOLUME /app/dist
CMD ["tail", "-f", "/dev/null"]