From 054590fc8620330ab918636512aaf5b499fe5a58 Mon Sep 17 00:00:00 2001 From: Akshay Gupta Date: Sat, 9 Nov 2024 10:45:20 -0800 Subject: [PATCH] update build base image (#1660) --- Dockerfile | 4 ++-- Makefile | 12 +++++++++++- go.mod | 4 ++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 66b2b7195..f11fe75c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ ARG BUILDPLATFORM=linux/amd64 -ARG BUILD_BASE_IMAGE -ARG BINARY_BASE_IMAGE +ARG BUILD_BASE_IMAGE=golang:1.23.3 +ARG BINARY_BASE_IMAGE=ubuntu:22.04 FROM --platform=$BUILDPLATFORM $BUILD_BASE_IMAGE AS build WORKDIR /azure diff --git a/Makefile b/Makefile index 862081eb7..599dc32d7 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ GO_BINARY_NAME ?= appgw-ingress GOOS ?= linux GARCH ?= arm64 -BUILD_BASE_IMAGE ?= golang:1.22.5-bookworm +BUILD_BASE_IMAGE ?= golang:1.23.3 BINARY_BASE_IMAGE ?= ubuntu:22.04 REPO ?= appgwreg.azurecr.io @@ -65,6 +65,16 @@ build-image-multi-arch: $(IMAGE_TAGS) \ $(shell pwd) +build-image: + @docker build \ + --build-arg "BUILD_BASE_IMAGE=$(BUILD_BASE_IMAGE)" \ + --build-arg "BINARY_BASE_IMAGE=$(BINARY_BASE_IMAGE)" \ + --build-arg "BUILD_TAG=$(BUILD_TAG)" \ + --build-arg "BUILD_DATE=$(BUILD_DATE)" \ + --build-arg "GIT_HASH=$(GIT_HASH)" \ + $(IMAGE_TAGS) \ + $(shell pwd) + build: go build -mod=readonly -v -ldflags="$(GO_LDFLAGS)" -v -o ./bin/${GO_BINARY_NAME} ./cmd/appgw-ingress diff --git a/go.mod b/go.mod index 471cee2da..dae850840 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module github.com/Azure/application-gateway-kubernetes-ingress -go 1.22.0 +go 1.23.0 -toolchain go1.22.4 +toolchain go1.23.3 require ( github.com/Azure/azure-sdk-for-go v66.0.0+incompatible