Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile.IntelNetSecVSP.rhel
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ COPY . .
# Due to https://github.com/golang/go/issues/70329 cross-compilation hangs at times.
# As a temporary workaround, we can try specifying GOMAXPROCS=2 to relieve this issue
RUN mkdir -p /bin && \
GOMAXPROCS=2 CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} make build-intel-netsec-vsp
GOMAXPROCS=2 CGO_ENABLED=1 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} make build-intel-netsec-vsp

# Use distroless as minimal base image to package the Marvell VSP binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.IntelVSP.rhel
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ COPY . .

# Due to https://github.com/golang/go/issues/70329 cross-compilation hangs at times.
# As a temporary workaround, we can try specifying GOMAXPROCS=2 to relieve this issue
RUN GOMAXPROCS=2 CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} make build-intel-vsp
RUN GOMAXPROCS=2 CGO_ENABLED=1 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} make build-intel-vsp

FROM registry.ci.openshift.org/ocp/4.20:base-rhel9
ARG TARGETARCH
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.daemon.rhel
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ COPY . .

# Due to https://github.com/golang/go/issues/70329 cross-compilation hangs at times.
# As a temporary workaround, we can try specifying GOMAXPROCS=2 to relieve this issue
RUN GOMAXPROCS=2 CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} make build-daemon
RUN GOMAXPROCS=2 CGO_ENABLED=1 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} make build-daemon

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.mrvlCPAgent.rhel
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ RUN \
# As a temporary workaround, we can try specifying GOMAXPROCS=2 to relieve this issue

WORKDIR /workspace
RUN GOMAXPROCS=2 CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -o /cpagent-bin/cp-agent-run internal/daemon/vendor-specific-plugins/marvell/cp-agent/cp-agent-run.go
RUN GOMAXPROCS=2 CGO_ENABLED=1 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -o /cpagent-bin/cp-agent-run internal/daemon/vendor-specific-plugins/marvell/cp-agent/cp-agent-run.go

# Use distroless as minimal base image to package the Marvell CP agent binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.mrvlVSP.rhel
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ COPY . .
# Due to https://github.com/golang/go/issues/70329 cross-compilation hangs at times.
# As a temporary workaround, we can try specifying GOMAXPROCS=2 to relieve this issue
RUN mkdir -p /bin && \
GOMAXPROCS=2 CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} make build-marvell-vsp
GOMAXPROCS=2 CGO_ENABLED=1 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} make build-marvell-vsp

# Use distroless as minimal base image to package the Marvell VSP binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.networkResourcesInjector.rhel
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ARG TARGETOS
ARG TARGETARCH
WORKDIR /workspace
COPY . .
RUN GOMAXPROCS=2 CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} make build-network-resources-injector
RUN GOMAXPROCS=2 CGO_ENABLED=1 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} make build-network-resources-injector

FROM registry.ci.openshift.org/ocp/4.20:base-rhel9
ARG TARGETARCH
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.rhel
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ COPY . .

# Due to https://github.com/golang/go/issues/70329 cross-compilation hangs at times.
# As a temporary workaround, we can try specifying GOMAXPROCS=2 to relieve this issue
RUN GOMAXPROCS=2 CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} make build-manager
RUN GOMAXPROCS=2 CGO_ENABLED=1 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} make build-manager
Copy link
Contributor

@thom311 thom311 Aug 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please explain in the commit message why "[it] should be enabled"?

Also, please summarize in one sentence what this environment variable does and what CGO is.

It would also be interesting, why we currently have CGO_ENABLED=0, and what now changed so we enable it. But the git history is not clear about that, so we might not know. If you know, please elaborate. If you don't know, say "I don't know why it was CGO_ENABLED=0 from the beginning. We shouldn' do that anymore.".

Please explain why things are done!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, you said "to meet go compliance".

Please elaborate on what that means. And do so in the commit message.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, description updated

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we currently have CGO_ENABLED=0, and what now changed so we enable it.
This should be found earlier once FIPS is enabled, somehow it didn't find until now, this means this may need backport to lower releases(4.16-4.19).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might as well do it for all docker files. The pattern is the same for all of them.


# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
Expand Down