forked from KomMonitor/web-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (22 loc) · 675 Bytes
/
Dockerfile
File metadata and controls
31 lines (22 loc) · 675 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
28
29
30
31
# ---- Base build ----
FROM node:15-alpine as build
RUN apk add --no-cache \
git \
python \
g++ \
make
RUN mkdir -p /kommonitor-webclient
# Copy source files for build
ADD . /kommonitor-webclient
WORKDIR /kommonitor-webclient
# Run the build
RUN npm run build
# actual image
FROM nginx:alpine
COPY --from=build kommonitor-webclient/nginx.conf /etc/nginx/nginx.conf
WORKDIR /usr/share/nginx/html
## Remove default nginx website
RUN rm -rf /usr/share/nginx/html/*
## From 'builder' stage copy over the artifacts in dist folder to default nginx public folder
COPY --from=build kommonitor-webclient/dist /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]