forked from nmstate/nmstate-console-plugin
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
31 lines (22 loc) · 739 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
# Builder container
FROM registry.ci.openshift.org/ocp/builder:rhel-8-base-nodejs-openshift-4.15 AS build
# Install yarn
RUN npm install -g yarn -s &>/dev/null
# Copy app source
COPY . /opt/app-root/src/app
WORKDIR /opt/app-root/src/app
# Run install as supper tux
USER 0
RUN yarn install --frozen-lockfile --network-timeout 600000 && yarn build
# Web server container
FROM registry.access.redhat.com/ubi9/nginx-120
# Use none-root user
USER 1001
# Set nginx configuration
# COPY nginx.conf /etc/nginx/nginx.conf
# When using ubi9/nginx-120 defaults:
# listen 8080 default_server;
# root /opt/app-root/src;
COPY --from=build /opt/app-root/src/app/dist /opt/app-root/src
# Run the server
CMD nginx -g "daemon off;"