forked from openshift/logging-view-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.ci
36 lines (26 loc) · 905 Bytes
/
Dockerfile.ci
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
FROM registry.redhat.io/ubi8/ubi-minimal:8.6 as builder
ENV APP_ROOT=/opt/app-root \
HOME=/opt/app-root/src \
NPM_RUN=start \
PLATFORM="el8" \
NODEJS_VERSION=16 \
NPM_RUN=start \
NAME=nodejs
ENV NPM_CONFIG_PREFIX=$HOME/.npm-global \
PATH=$HOME/node_modules/.bin/:$HOME/.npm-global/bin/:$PATH
RUN INSTALL_PKGS="nodejs nodejs-nodemon npm findutils tar" && \
microdnf module disable nodejs && \
microdnf module enable nodejs:$NODEJS_VERSION && \
microdnf --nodocs install $INSTALL_PKGS && \
microdnf clean all && \
rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.*
WORKDIR ${HOME}
ENV HUSKY=0
COPY package*.json .
RUN npm ci
COPY . ${HOME}
RUN npm run build
FROM registry.redhat.io/ubi8/nginx-120:1-44
USER 1001
COPY --from=builder /opt/app-root/src/dist /usr/share/nginx/html
ENTRYPOINT ["nginx", "-g", "daemon off;"]