forked from netobserv/netobserv-web-console
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.downstream
More file actions
62 lines (46 loc) · 2.05 KB
/
Dockerfile.downstream
File metadata and controls
62 lines (46 loc) · 2.05 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
ARG BUILDVERSION
ARG BUILDVERSION_Y
FROM registry.access.redhat.com/ubi9/nodejs-22:9.7-1769459345 as web-builder
WORKDIR /opt/app-root
COPY --chown=default web/package.json web/package.json
COPY --chown=default web/package-lock.json web/package-lock.json
WORKDIR /opt/app-root/web
RUN CYPRESS_INSTALL_BINARY=0 node --max-old-space-size=6000 $(which npm) --legacy-peer-deps ci --ignore-scripts
WORKDIR /opt/app-root
COPY --chown=default web web
COPY --chown=default mocks mocks
WORKDIR /opt/app-root/web
RUN TRANSPILE_ONLY=true npm run build
RUN TRANSPILE_ONLY=true npm run build:static
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.25 as go-builder
ARG BUILDVERSION
WORKDIR /opt/app-root
COPY go.mod go.mod
COPY go.sum go.sum
COPY vendor/ vendor/
COPY cmd/ cmd/
COPY pkg/ pkg/
ENV GOEXPERIMENT strictfipsruntime
RUN go build -tags strictfipsruntime -ldflags "-X 'main.buildVersion=$BUILDVERSION' -X 'main.buildDate=`date +%Y-%m-%d\ %H:%M`'" -mod vendor -o plugin-backend cmd/plugin-backend.go
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7-1769056855
ARG BUILDVERSION
ARG BUILDVERSION_Y
COPY --from=web-builder /opt/app-root/web/dist ./web/dist
COPY --from=go-builder /opt/app-root/plugin-backend ./
COPY LICENSE /licenses/
USER 65532:65532
ENTRYPOINT ["./plugin-backend"]
LABEL distribution-scope="public"
LABEL url="https://catalog.redhat.com/en/search?searchType=containers"
LABEL vendor="Red Hat, Inc."
LABEL release=$BUILDVERSION
LABEL com.redhat.component="network-observability-console-plugin-container"
LABEL name="network-observability/network-observability-console-plugin-rhel9"
LABEL cpe="cpe:/a:redhat:network_observ_optr:$BUILDVERSION_Y::el9"
LABEL io.k8s.display-name="Network Observability Console Plugin"
LABEL io.k8s.description="Network Observability Console Plugin"
LABEL summary="Network Observability Console Plugin"
LABEL maintainer="support@redhat.com"
LABEL io.openshift.tags="network-observability-console-plugin"
LABEL description="Network Observability visualization tool for the OpenShift Console."
LABEL version=$BUILDVERSION