-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (26 loc) · 1.2 KB
/
Dockerfile
File metadata and controls
29 lines (26 loc) · 1.2 KB
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
ARG APP_DIR=/opt/app-root/src
FROM registry.access.redhat.com/ubi9/nodejs-22:9.7-1775695872 AS frontend_build
USER root
WORKDIR /usr/src/app
ADD console-extensions.json eslint.config.js i18next-parser.config.js package.json yarn.lock .prettierrc.yml tsconfig.json webpack.config.ts /usr/src/app/
ADD locales /usr/src/app/locales
ADD i18n-scripts /usr/src/app/i18n-scripts
ADD src/openshift /usr/src/app/src/openshift
ADD src/cryostat-web /usr/src/app/src/cryostat-web
RUN (command -v corepack || npm install --global corepack) && \
corepack enable
RUN echo "nodeLinker: node-modules" > .yarnrc.yml
RUN yarn install && yarn build
FROM registry.access.redhat.com/ubi9/nodejs-22:9.7-1775695872 AS backend_build
USER root
WORKDIR /usr/src/app
ADD backend /usr/src/app
RUN npm ci && npm run build
FROM registry.access.redhat.com/ubi9/nodejs-22-minimal:9.7-1775651415
ARG APP_DIR
ENV SRVDIR="${APP_DIR}"
LABEL io.cryostat.component=console-plugin
COPY --from=backend_build /usr/src/app/node_modules/ "${APP_DIR}"/node_modules
COPY --from=backend_build /usr/src/app/dist/server.js "${APP_DIR}"
COPY --from=frontend_build /usr/src/app/dist "${APP_DIR}"/html
ENTRYPOINT [ "/usr/bin/bash", "-c", "/usr/bin/node ${SRVDIR}/server.js" ]