-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathDockerfile.downstream
42 lines (34 loc) · 1.43 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
ARG BUILDVERSION
# Build the manager binary
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.23 as builder
ARG BUILDVERSION
WORKDIR /opt/app-root
# Copy the go manifests and source
COPY bpf/ bpf/
COPY cmd/ cmd/
COPY pkg/ pkg/
COPY vendor/ vendor/
COPY go.mod go.mod
COPY go.sum go.sum
# Build
ENV GOEXPERIMENT strictfipsruntime
RUN go build -tags strictfipsruntime -ldflags "-X 'main.buildVersion=${BUILDVERSION}' -X 'main.buildDate=`date +%Y-%m-%d\ %H:%M`'" -mod vendor -a -o bin/netobserv-ebpf-agent cmd/netobserv-ebpf-agent.go
# Create final image from minimal + built binary
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.5-1742914212
ARG BUILDVERSION
WORKDIR /
COPY --from=builder /opt/app-root/bin/netobserv-ebpf-agent .
COPY LICENSE /licenses/
COPY bpf/LICENSE /licenses/LICENSE-GPL
COPY README.downstream /licenses/README
USER 65532:65532
ENTRYPOINT ["/netobserv-ebpf-agent"]
LABEL com.redhat.component="network-observability-ebpf-agent-container"
LABEL name="network-observability-ebpf-agent"
LABEL io.k8s.display-name="Network Observability eBPF Agent"
LABEL io.k8s.description="Network Observability eBPF Agent"
LABEL summary="Network Observability eBPF Agent"
LABEL maintainer="[email protected]"
LABEL io.openshift.tags="network-observability-ebpf-agent"
LABEL description="The Network Observability eBPF Agent allows collecting and aggregating all the ingress and egress flows on a Linux host."
LABEL version=$BUILDVERSION