forked from openshift-pipelines/console-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (19 loc) · 633 Bytes
/
Dockerfile
File metadata and controls
27 lines (19 loc) · 633 Bytes
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
ARG BUILDER=registry.access.redhat.com/ubi9/nodejs-20
ARG RUNTIME=registry.access.redhat.com/ubi9/nginx-124
# Stage 1: Build UI
FROM $BUILDER AS builder-ui
USER root
# Enable Corepack and prepare Yarn 4.6
RUN npm install -g corepack && corepack enable && corepack prepare yarn@4.6.0 --activate
# Copy source
ADD . /usr/src/app
WORKDIR /usr/src/app
# Install dependencies & build
RUN yarn install --immutable && \
yarn build
# Stage 2: Serve with Nginx
FROM $RUNTIME
COPY --from=builder-ui /usr/src/app/dist /usr/share/nginx/html
COPY ./nginx.conf /etc/nginx/nginx.conf
USER 1001
ENTRYPOINT ["nginx", "-g", "daemon off;"]