File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ COPY controllers/ controllers/
2323COPY utils/ utils/
2424
2525# Build
26- RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} GO111MODULE=on go build -a -o manager main.go
26+ RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} GO111MODULE=on go build -p=2 -o manager main.go
2727
2828# Use distroless as minimal base image to package the manager binary
2929# Refer to https://github.com/GoogleContainerTools/distroless for more details
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ COPY pkg/ pkg/
1717COPY controllers/ controllers/
1818COPY utils/ utils/
1919
20- RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} GO111MODULE=on go build -a -trimpath -o /workspace/manager main.go
20+ RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} GO111MODULE=on go build -p=2 -trimpath -o /workspace/manager main.go
2121
2222FROM alpine:3.21
2323
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ COPY controllers/ controllers/
2323COPY utils/ utils/
2424
2525# Build
26- RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} GO111MODULE=on go build -a -o manager main.go
26+ RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} GO111MODULE=on go build -p=2 -o manager main.go
2727
2828# Use ubi image as the base image which is required by the red hat certification.
2929# Base on the image size, the order is ubi > ubi-minimal > ubi-micro.
You can’t perform that action at this time.
0 commit comments