Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
48 lines (39 loc) · 2.35 KB
/
Copy pathDockerfile
File metadata and controls
48 lines (39 loc) · 2.35 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi9/nodejs-24:latest@sha256:e2e5691882dda8415ebdb62471684e5d910a6085f2fab0acdc10261b78dcd17a AS nodebuilder
USER root
WORKDIR /usr/src/app
COPY package.json yarn.lock .yarnrc.yml ./
COPY .yarn/ .yarn/
RUN if [ -f /cachi2/cachi2.env ]; then . /cachi2/cachi2.env; fi && PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 node .yarn/releases/yarn-*.cjs install --immutable
COPY console-extensions.json tsconfig.json webpack.config.mts ./
COPY src/ src/
COPY locales/ locales/
COPY config/ config/
RUN if [ -f /cachi2/cachi2.env ]; then . /cachi2/cachi2.env; fi && node .yarn/releases/yarn-*.cjs build
FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi9/go-toolset:1.26.10-1793107762@sha256:c8947b60e6568dcdc5f66d382e18fa1fb89039918f59783e45b8c90847579955 AS gobuilder
ARG TARGETOS TARGETARCH
ENV GOOS=$TARGETOS GOARCH=$TARGETARCH
ENV GOFIPS140=v1.0.0
WORKDIR /opt/app-root/src
COPY --chown=1001:0 backend/go.mod backend/go.sum backend/
RUN if [ -f /cachi2/cachi2.env ]; then . /cachi2/cachi2.env; fi && \
go -C backend mod download
COPY --chown=1001:0 --from=nodebuilder /usr/src/app/dist backend/static
COPY --chown=1001:0 backend/ backend/
RUN if [ -f /cachi2/cachi2.env ]; then . /cachi2/cachi2.env; fi && \
mkdir -p bin && CGO_ENABLED=0 go -C backend build -ldflags="-s -w" -o ../bin/plugin-backend .
FROM registry.access.redhat.com/ubi9-micro:latest@sha256:5be877a2a280ae36eb9ab80ca4efb28bbf77c57abbba38137cdc37a03b8465e6
COPY --from=gobuilder /opt/app-root/src/bin/plugin-backend /usr/bin/plugin-backend
COPY --from=gobuilder /etc/pki/tls/certs/ca-bundle.crt /etc/pki/tls/certs/ca-bundle.crt
USER 1001
LABEL name="openshift-serverless-tech-preview/functions-console-plugin-rhel9" \
com.redhat.component="openshift-serverless-faas-console-plugin-container" \
version="2.0" \
release="1" \
summary="OpenShift Serverless Functions Console Plugin" \
description="A Functions-as-a-Service UI for the OpenShift Web Console" \
io.k8s.display-name="OpenShift Serverless Functions Console Plugin" \
io.k8s.description="A Functions-as-a-Service UI for the OpenShift Web Console" \
io.openshift.tags="openshift,serverless,functions,faas,console,plugin" \
maintainer="serverless-support@redhat.com" \
cpe="cpe:/a:redhat:openshift_serverless:2.0::el9"
ENTRYPOINT ["plugin-backend"]