-
Notifications
You must be signed in to change notification settings - Fork 85
/
Containerfile.acm.konflux
36 lines (29 loc) · 1.16 KB
/
Containerfile.acm.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:acm
# 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/acm/dist ./public/plugin
USER 1001
CMD ["node", "backend.mjs"]
LABEL com.redhat.component="console-container" \
name="rhacm2/console-rhel9" \
summary="console" \
io.openshift.expose-services="" \
io.openshift.tags="data,images" \
io.k8s.display-name="console" \
maintainer="['[email protected]']" \
description="console"