-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (25 loc) · 755 Bytes
/
Dockerfile
File metadata and controls
27 lines (25 loc) · 755 Bytes
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
# --------------------------------------------------------------*
# 1. build angualr app
# --------------------------------------------------------------*
FROM node as build_ng
# update depedencies
RUN apt-get update && apt-get install -y \
curl \
&& rm -rf /var/lib/apt/lists/*
# create app directory
WORKDIR /app
# copy depedencies
COPY package*.json /app
# install
RUN npm install -g npm-check-updates \
ncu -u \
npm install
# copy everything
COPY . .
RUN npm install -g @angular/cli \
npm run build --prod
# --------------------------------------------------------------*
# 2. Run the anglar app
# --------------------------------------------------------------*
FROM nginx
COPY --from=build_ng /app/public /usr/share/nginx/html