-
Notifications
You must be signed in to change notification settings - Fork 85
/
Containerfile.mce.konflux
36 lines (29 loc) · 1.27 KB
/
Containerfile.mce.konflux
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/ubi9/nodejs-20-minimal:1-47 AS builder
USER root
ENV NPM_CONFIG_NODEDIR=/usr
WORKDIR /app
COPY . .
# Running installs concurrently fails on aarch64
RUN npm ci --omit=optional --unsafe-perm --ignore-scripts
RUN cd backend && npm ci --omit=optional --unsafe-perm
RUN cd frontend && npm ci --legacy-peer-deps --unsafe-perm
RUN npm run build:backend
RUN cd frontend && npm run build:plugin:mce
# Remove build-time dependencies before packaging
RUN cd backend && npm ci --omit=optional --only=production --unsafe-perm
FROM brew.registry.redhat.io/rh-osbs/rhacm2-nodejs-parent:v2.10.0_20-13
WORKDIR /app
ENV NODE_ENV production
COPY --from=builder /app/backend/node_modules ./node_modules
COPY --from=builder /app/backend/backend.mjs ./
COPY --from=builder /app/frontend/plugins/mce/dist ./public/plugin
USER 1001
CMD ["node", "backend.mjs"]
LABEL com.redhat.component="multicluster-engine-console-mce-container" \
name="multicluster-engine/console-mce-rhel9" \
summary="multicluster-engine-console-mce" \
io.openshift.expose-services="" \
io.openshift.tags="data,images" \
io.k8s.display-name="multicluster-engine-console-mce" \
maintainer="['[email protected]']" \
description="multicluster-engine-console-mce"