Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,28 @@ WORKDIR /usr/src/app
# Copy only package files first for better layer caching
COPY package.json package-lock.json ./

RUN NODE_OPTIONS=--max-old-space-size=4096 npm ci --omit=dev --omit=optional --loglevel verbose --ignore-scripts --no-fund
RUN NODE_OPTIONS=--max-old-space-size=4096 npm ci --omit=dev --omit=optional --ignore-scripts --no-fund

COPY console-extensions.json LICENSE tsconfig.json types.d.ts webpack.config.ts ./
COPY locales ./locales
COPY src ./src
RUN npm run build --loglevel verbose
RUN npm run build

FROM registry.access.redhat.com/ubi9/nginx-124:latest
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest
USER 0

RUN microdnf install -y nginx && microdnf clean all

COPY --from=build /usr/src/app/dist /usr/share/nginx/html

RUN mkdir -p /licenses
COPY --from=build /usr/src/app/LICENSE /licenses/LICENSE

# Create nginx temp directory and set permissions for OpenShift
RUN mkdir -p /tmp/nginx && \
chgrp -R 0 /var/log/nginx /var/lib/nginx /usr/share/nginx/html /tmp/nginx && \
chmod -R g=u /var/log/nginx /var/lib/nginx /usr/share/nginx/html /tmp/nginx

LABEL name="openshift-lightspeed/lightspeed-console-plugin-rhel9" \
cpe="cpe:/a:redhat:openshift_lightspeed:1::el9" \
com.redhat.component="openshift-lightspeed" \
Expand All @@ -26,6 +36,7 @@ LABEL name="openshift-lightspeed/lightspeed-console-plugin-rhel9" \
description="OpenShift Lightspeed Console provides OCP console plugin for OpenShift Lightspeed Service" \
io.k8s.description="OpenShift Lightspeed Console is a component of OpenShift Lightspeed" \
io.openshift.tags="openshift-lightspeed,ols"

USER 1001

ENTRYPOINT ["nginx", "-g", "daemon off;", "-e", "stderr"]