forked from stolostron/console
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.mce.prow
27 lines (23 loc) · 957 Bytes
/
Dockerfile.mce.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
26
27
# Copyright Contributors to the Open Cluster Management project
FROM registry.ci.openshift.org/stolostron/builder:nodejs18-linux as dynamic-plugin
WORKDIR /app/frontend
COPY ./frontend .
RUN npm ci --no-optional --legacy-peer-deps
RUN npm run build:plugin:mce
FROM registry.ci.openshift.org/stolostron/builder:nodejs18-linux as backend
WORKDIR /app/backend
COPY ./backend .
RUN npm ci --no-optional
RUN npm run build
FROM registry.ci.openshift.org/stolostron/builder:nodejs18-linux as production
WORKDIR /app/backend
COPY ./backend/package-lock.json ./backend/package.json ./
RUN npm ci --no-optional --only=production
FROM registry.ci.openshift.org/stolostron/common-nodejs-parent:nodejs-18
WORKDIR /app
ENV NODE_ENV production
COPY --from=production /app/backend/node_modules ./node_modules
COPY --from=backend /app/backend/backend.mjs ./
COPY --from=dynamic-plugin /app/frontend/plugins/mce/dist ./public/plugin
USER 1001
CMD ["node", "backend.mjs"]