-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathDockerfile.art
More file actions
30 lines (22 loc) · 973 Bytes
/
Dockerfile.art
File metadata and controls
30 lines (22 loc) · 973 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
FROM registry.ci.openshift.org/ocp/builder:rhel-9-base-nodejs-openshift-4.16 AS builder
# Copy app sources
COPY $REMOTE_SOURCES $REMOTE_SOURCES_DIR
COPY . /usr/src/app
WORKDIR /usr/src/app
USER 0
# use dependencies provided by Cachito
ENV HUSKY=0
RUN test -d ${REMOTE_SOURCES_DIR}/cachito-gomod-with-deps || exit 1; \
cp -f $REMOTE_SOURCES_DIR/cachito-gomod-with-deps/app/{.npmrc,package-lock.json,registry-ca.pem} . \
&& source ${REMOTE_SOURCES_DIR}/cachito-gomod-with-deps/cachito.env \
&& npm ci && npm run build
FROM registry.ci.openshift.org/ocp/4.16: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
USER 1001
COPY --from=builder /usr/src/app/dist /usr/share/nginx/html
ENTRYPOINT ["nginx", "-g", "daemon off;"]