forked from stolostron/console-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.prow
23 lines (19 loc) · 904 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
# Copyright Contributors to the Open Cluster Management project
FROM registry.ci.openshift.org/stolostron/builder:nodejs14-linux as builder
USER root
WORKDIR /opt/app-root/console-api
COPY . /opt/app-root/console-api/
RUN cd /opt/app-root/console-api/ && npm ci && npm run build:production && npm prune --production
FROM registry.ci.openshift.org/stolostron/common-nodejs-parent:nodejs-14
RUN microdnf 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"]