-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (27 loc) · 848 Bytes
/
Dockerfile
File metadata and controls
41 lines (27 loc) · 848 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
32
33
34
35
36
37
38
39
40
41
FROM node:10.18.1-alpine
# Preparing working environment.
RUN mkdir -p /usr/src/rose-dashboard
WORKDIR /usr/src/rose-dashboard
# Installing dependencies.
COPY package.json /usr/src/rose-dashboard/
RUN npm install
# Copy rose-dashboard source into image.
COPY . /usr/src/rose-dashboard
# Building angular app.
RUN npm run build
# SETUP
FROM nginx:1.18.0
RUN apt-get update
# Removing nginx default page.
RUN rm -rf /usr/share/nginx/html/*
# Copying nginx configuration.
COPY /nginx/nginx.conf /etc/nginx/conf.d/default.conf
#RUN nginx -t
# Copying Angular artifacts into web server root.
COPY --from=0 /usr/src/rose-dashboard/dist/rose-dashboard /usr/share/nginx/html
# Remove rose-dashboard source and node_modules
RUN rm -rf /usr/src/rose-dashboard/
# Exposing ports.
EXPOSE 80
# Starting server.
CMD ["nginx", "-g", "daemon off;"]