-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
41 lines (24 loc) · 854 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
40
### STAGE 1: BUILDER ###
ARG NODE_VERSION=18.16.0
ARG ALPINE_VERSION=3.17.1
FROM node:${NODE_VERSION}-alpine AS node
FROM alpine:${ALPINE_VERSION} as builder
COPY --from=node /usr/lib /usr/lib
COPY --from=node /usr/local/lib /usr/local/lib
COPY --from=node /usr/local/include /usr/local/include
COPY --from=node /usr/local/bin /usr/local/bin
RUN npm install -g yarn --force
RUN mkdir -p /ng-app/dist/signature
WORKDIR /ng-app
COPY package.json package-lock.json ./
#RUN yarn add @angular/cli@17 --global
RUN npm install -g @angular/cli@17.3.4
RUN npm install --force
COPY . .
RUN yarn run build
### STAGE 2: SETUP ###
FROM nginx:1.14.1-alpine
COPY --from=builder /ng-app/dist/signature /usr/share/nginx/html
# CONFIGURE NGINX
COPY --from=builder /ng-app/dist/signature/nginx.conf /etc/nginx/nginx.conf
CMD ["nginx", "-g", "daemon off;"]