-
Notifications
You must be signed in to change notification settings - Fork 15
/
Dockerfile.downstream
55 lines (40 loc) · 1.72 KB
/
Dockerfile.downstream
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
ARG COMMIT
FROM registry.access.redhat.com/ubi9/nodejs-18:1-108.1716477799 as web-builder
ARG BUILDSCRIPT
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
WORKDIR /opt/app-root
COPY --chown=default web web
COPY --chown=default mocks mocks
WORKDIR /opt/app-root/web
RUN npm run format-all
RUN npm run build$BUILDSCRIPT
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.23 as go-builder
ARG BUILDVERSION
ARG DATE
WORKDIR /opt/app-root
COPY go.mod go.mod
COPY go.sum go.sum
COPY vendor/ vendor/
COPY .mk/ .mk/
COPY cmd/ cmd/
COPY pkg/ pkg/
RUN CGO_ENABLED=0 go build -ldflags "-X main.buildVersion=$BUILDVERSION -X main.buildDate=$DATE" -mod vendor -o plugin-backend cmd/plugin-backend.go
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.5
COPY --from=web-builder /opt/app-root/web/dist ./web/dist
COPY --from=go-builder /opt/app-root/plugin-backend ./
ENTRYPOINT ["./plugin-backend"]
LABEL com.redhat.component="network-observability-console-plugin-container"
LABEL name="network-observability-console-plugin"
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 upstream-vcs-ref="$COMMIT"
LABEL upstream-vcs-type="git"
LABEL description="Based on Openshift Console dynamic plugin, this plugin implement the console elements for Network Observability."
LABEL version="1.8.0"