File tree Expand file tree Collapse file tree 3 files changed +13
-8
lines changed Expand file tree Collapse file tree 3 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 1+ # These require updating the go version to 1.23.
2+ # According to govulncheck we are not using code that is affected by them anyway
3+ CVE-2025-22870
4+ CVE-2025-22872
Original file line number Diff line number Diff line change 1313# limitations under the License.
1414
1515# Build the manager binary
16- FROM golang:1.22.0 as builder
16+ ARG GO_VERSION
17+ FROM golang:${GO_VERSION} AS builder
1718WORKDIR /workspace
1819
1920# Run this with docker build --build_arg goproxy=$(go env GOPROXY) to override the goproxy
@@ -30,7 +31,7 @@ COPY orc/go.sum orc/go.sum
3031# Cache deps before building and copying source so that we don't need to re-download as much
3132# and so that source changes don't invalidate our downloaded layer
3233RUN --mount=type=cache,target=/go/pkg/mod \
33- go mod download
34+ go mod download
3435
3536# Copy the sources
3637COPY ./ ./
@@ -42,10 +43,10 @@ ARG ldflags
4243
4344# Do not force rebuild of up-to-date packages (do not use -a) and use the compiler cache folder
4445RUN --mount=type=cache,target=/root/.cache/go-build \
45- --mount=type=cache,target=/go/pkg/mod \
46- CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} \
47- go build -ldflags "${ldflags} -extldflags '-static'" \
48- -o manager ${package}
46+ --mount=type=cache,target=/go/pkg/mod \
47+ CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} \
48+ go build -ldflags "${ldflags} -extldflags '-static'" \
49+ -o manager ${package}
4950
5051# Production image
5152FROM gcr.io/distroless/static:nonroot
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ unexport GOPATH
2727TRACE ?= 0
2828
2929# Go
30- GO_VERSION ?= 1.22.7
30+ GO_VERSION ?= 1.22.12
3131
3232# Directories.
3333ARTIFACTS ?= $(REPO_ROOT ) /_artifacts
@@ -359,7 +359,7 @@ generate-api-docs-%: $(GEN_CRD_API_REFERENCE_DOCS) FORCE
359359
360360.PHONY : docker-build
361361docker-build : # # Build the docker image for controller-manager
362- docker build -f Dockerfile --build-arg goproxy=$(GOPROXY ) --build-arg ARCH=$(ARCH ) --build-arg ldflags=" $( LDFLAGS) " . -t $(CONTROLLER_IMG_TAG )
362+ docker build -f Dockerfile --build-arg GO_VERSION= $( GO_VERSION ) --build-arg goproxy=$(GOPROXY ) --build-arg ARCH=$(ARCH ) --build-arg ldflags=" $( LDFLAGS) " . -t $(CONTROLLER_IMG_TAG )
363363
364364.PHONY : docker-push
365365docker-push : # # Push the docker image
You can’t perform that action at this time.
0 commit comments