forked from stolostron/console-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.prow
25 lines (22 loc) · 936 Bytes
/
Dockerfile.prow
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
# Copyright Contributors to the Open Cluster Management project
FROM registry.ci.openshift.org/open-cluster-management/builder:nodejs14-linux-amd64 as builder
USER root
WORKDIR /opt/app-root/console-api
COPY . /opt/app-root/console-api/
RUN yum install git -y
RUN cd /opt/app-root/console-api/ && npm ci && npm run build:production
FROM registry.access.redhat.com/ubi8/nodejs-14:1
USER root
RUN yum -y remove nodejs-nodemon
RUN yum -y update
RUN mkdir -p /opt/app-root/console-api
WORKDIR /opt/app-root/console-api
ENV BABEL_DISABLE_CACHE=1 \
NODE_ENV=production \
USER_UID=1001
COPY --from=builder /opt/app-root/console-api/build/src /opt/app-root/console-api/build
COPY --from=builder /opt/app-root/console-api/build/config /opt/app-root/console-api/config
COPY --from=builder /opt/app-root/console-api/node_modules /opt/app-root/console-api/node_modules
EXPOSE 4000
ENV NODE_ENV production
CMD ["node", "./build/index.js"]