Skip to content

Commit 7ee93ce

Browse files
committed
Do not build with CGO_ENABLED=0
Back in ddeb140 this made sense, since we were based on SCRATCH. But now we use origin:base and should not try to be fancy. Statically linking the binary and basing on SCRATCH allows us to minimize the layer size. If we're using a full base image, it no longer makes sense to statically link, since we have the libraries we need in the image. Also, when using the RHEL golang compiler fork, instead of upstream, building wth CGO_ENABLED=0 disables the ability to use nss and to get FIPS compliance. This will cause the CVO image to follow the same pattern as everything else.
1 parent 2c4931d commit 7ee93ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hack/build-go.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ fi
3030
mkdir -p ${BIN_PATH}
3131

3232
echo "Building ${REPO} (${VERSION_OVERRIDE})"
33-
CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} go build ${GOFLAGS} -ldflags "${GLDFLAGS}" -o ${BIN_PATH}/cluster-version-operator ${REPO}/cmd/...
33+
GOOS=${GOOS} GOARCH=${GOARCH} go build ${GOFLAGS} -ldflags "${GLDFLAGS}" -o ${BIN_PATH}/cluster-version-operator ${REPO}/cmd/...

0 commit comments

Comments
 (0)