forked from nmstate-archive/nmstate-console-plugin
-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathDockerfile.art
More file actions
29 lines (22 loc) · 787 Bytes
/
Dockerfile.art
File metadata and controls
29 lines (22 loc) · 787 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
# Builder container
FROM registry.ci.openshift.org/ocp/builder:rhel-9-base-nodejs-openshift-4.22 AS build
ENV CYPRESS_INSTALL_BINARY 0
# Copy app source
COPY . /opt/app-root/src/app
COPY $REMOTE_SOURCES $REMOTE_SOURCES_DIR
WORKDIR /opt/app-root/src/app
USER 0
RUN npm ci && npm run build
# Web server container
FROM registry.ci.openshift.org/ocp/4.22:base-rhel9
RUN INSTALL_PKGS="nginx" && \
dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS && \
yum -y clean all --enablerepo='*' && \
chown -R 1001:0 /var/lib/nginx /var/log/nginx /run && \
chmod -R ug+rwX /var/lib/nginx /var/log/nginx /run
# Use none-root user
USER 1001
COPY --from=build /opt/app-root/src/app/dist /opt/app-root/src
# Run the server
CMD nginx -g "daemon off;"