File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 1+ ARG TARGETARCH
2+ ARG COMMIT
3+
14# Build the manager binary
2- FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.23 as builder
5+ FROM --platform=linux/$TARGETARCH brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.23 as builder
36
7+ ARG TARGETARCH=amd64
48ARG VERSION="unknown"
59ARG COMMIT
610
711WORKDIR /opt/app-root
812
913# Copy the go manifests and source
10- COPY .git/ .git/
1114COPY bpf/ bpf/
1215COPY cmd/ cmd/
1316COPY pkg/ pkg/
1417COPY vendor/ vendor/
1518COPY go.mod go.mod
1619COPY go.sum go.sum
17- COPY Makefile Makefile
18- COPY .mk/ .mk/
1920
2021# Build
21- RUN make compile
22+ RUN GOARCH=$TARGETARCH go build -ldflags "-X 'main.buildVersion=${VERSION}-${COMMIT}' -X 'main.buildDate=`date +%Y-%m-%d\ %H:%M`'" -mod vendor -a -o bin/netobserv-ebpf-agent cmd/netobserv-ebpf-agent.go
2223
2324# Create final image from minimal + built binary
24- FROM registry.access.redhat.com/ubi9/ubi-minimal:9.5-1738816775
25+ FROM --platform=linux/$TARGETARCH registry.access.redhat.com/ubi9/ubi-minimal:9.5-1738816775
26+ ARG COMMIT
27+
2528WORKDIR /
2629COPY --from=builder /opt/app-root/bin/netobserv-ebpf-agent .
2730USER 65532:65532
You can’t perform that action at this time.
0 commit comments