From 294136e7297a009d67921654270377c604bc10bf Mon Sep 17 00:00:00 2001 From: Simon Ostendorf Date: Wed, 18 Dec 2024 10:46:34 +0100 Subject: [PATCH 1/2] feat: use specified go version for docker build --- Dockerfile | 3 ++- Makefile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9b2efdb535..945af89a42 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,8 @@ # limitations under the License. # Build the manager binary -FROM golang:1.23.0 AS builder +ARG GO_VERSION +FROM golang:${GO_VERSION} as builder WORKDIR /workspace # Run this with docker build --build_arg goproxy=$(go env GOPROXY) to override the goproxy diff --git a/Makefile b/Makefile index 54be0f2d92..6bb68329b7 100644 --- a/Makefile +++ b/Makefile @@ -330,7 +330,7 @@ generate-api-docs-%: $(GEN_CRD_API_REFERENCE_DOCS) FORCE .PHONY: docker-build docker-build: ## Build the docker image for controller-manager - docker build -f Dockerfile --build-arg goproxy=$(GOPROXY) --build-arg ARCH=$(ARCH) --build-arg ldflags="$(LDFLAGS)" . -t $(CONTROLLER_IMG_TAG) + 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) .PHONY: docker-push docker-push: ## Push the docker image From 26f3cb4c91e485790dbf3d251728df24c1f081a6 Mon Sep 17 00:00:00 2001 From: Simon Ostendorf Date: Tue, 14 Jan 2025 10:08:54 +0100 Subject: [PATCH 2/2] fix: use go 1.23 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6bb68329b7..523542e45a 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ export GO111MODULE=on unexport GOPATH # Go -GO_VERSION ?= 1.22.7 +GO_VERSION ?= 1.23.0 # Directories. ARTIFACTS ?= $(REPO_ROOT)/_artifacts