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 13
13
# limitations under the License.
14
14
15
15
# Build the manager binary
16
- FROM golang:1.22.0 as builder
16
+ ARG GO_VERSION
17
+ FROM golang:${GO_VERSION} AS builder
17
18
WORKDIR /workspace
18
19
19
20
# 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
30
31
# Cache deps before building and copying source so that we don't need to re-download as much
31
32
# and so that source changes don't invalidate our downloaded layer
32
33
RUN --mount=type=cache,target=/go/pkg/mod \
33
- go mod download
34
+ go mod download
34
35
35
36
# Copy the sources
36
37
COPY ./ ./
@@ -42,10 +43,10 @@ ARG ldflags
42
43
43
44
# Do not force rebuild of up-to-date packages (do not use -a) and use the compiler cache folder
44
45
RUN --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}
49
50
50
51
# Production image
51
52
FROM gcr.io/distroless/static:nonroot
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ unexport GOPATH
27
27
TRACE ?= 0
28
28
29
29
# Go
30
- GO_VERSION ?= 1.22.7
30
+ GO_VERSION ?= 1.22.12
31
31
32
32
# Directories.
33
33
ARTIFACTS ?= $(REPO_ROOT ) /_artifacts
@@ -359,7 +359,7 @@ generate-api-docs-%: $(GEN_CRD_API_REFERENCE_DOCS) FORCE
359
359
360
360
.PHONY : docker-build
361
361
docker-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 )
363
363
364
364
.PHONY : docker-push
365
365
docker-push : # # Push the docker image
You can’t perform that action at this time.
0 commit comments