forked from netobserv/netobserv-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.downstream
More file actions
44 lines (36 loc) · 1.43 KB
/
Dockerfile.downstream
File metadata and controls
44 lines (36 loc) · 1.43 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
ARG BUILDVERSION
ARG BUILDVERSION_Y
# Build the manager binary
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.24 as builder
ARG BUILDVERSION
WORKDIR /opt/app-root
# Copy the go manifests and source
COPY go.mod go.mod
COPY go.sum go.sum
COPY vendor/ vendor/
COPY main.go main.go
COPY api/ api/
COPY internal/ internal/
COPY config/ config/
# Build
ENV GOEXPERIMENT strictfipsruntime
RUN GOOS=linux GO111MODULE=on go build -tags strictfipsruntime -ldflags "-X 'main.buildVersion=${BUILDVERSION}' -X 'main.buildDate=`date +%Y-%m-%d\ %H:%M`'" -mod vendor -a -o manager main.go
# Create final image from minimal + built binary
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7-1763362218
ARG BUILDVERSION
ARG BUILDVERSION_Y
WORKDIR /
COPY --from=builder /opt/app-root/manager .
COPY LICENSE /licenses/
USER 65532:65532
ENTRYPOINT ["/manager"]
LABEL com.redhat.component="network-observability-operator-container"
LABEL name="network-observability/network-observability-rhel9-operator"
LABEL cpe="cpe:/a:redhat:network_observ_optr:$BUILDVERSION_Y::el9"
LABEL io.k8s.display-name="Network Observability Operator"
LABEL io.k8s.description="Network Observability Operator"
LABEL summary="Network Observability Operator"
LABEL maintainer="support@redhat.com"
LABEL io.openshift.tags="network-observability-operator"
LABEL description="NetObserv Operator is a Kubernetes / OpenShift operator for network observability."
LABEL version=$BUILDVERSION