From 31887b406a0e554a69e2c9d997313ab706a228f0 Mon Sep 17 00:00:00 2001 From: Markus Blaschke Date: Sat, 14 Sep 2024 20:02:35 +0200 Subject: [PATCH] switch to golang 1.23 Signed-off-by: Markus Blaschke --- Dockerfile | 6 +++--- go.mod | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 41a5432..285b47f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ ############################################# # Build ############################################# -FROM --platform=$BUILDPLATFORM golang:1.22-alpine as build +FROM --platform=$BUILDPLATFORM golang:1.23-alpine AS build RUN apk upgrade --no-cache --force RUN apk add --update build-base make git @@ -21,7 +21,7 @@ RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} make build ############################################# # Test ############################################# -FROM gcr.io/distroless/static as test +FROM gcr.io/distroless/static AS test USER 0:0 WORKDIR /app COPY --from=build /go/src/github.com/webdevops/azure-metrics-exporter/azure-metrics-exporter . @@ -30,7 +30,7 @@ RUN ["./azure-metrics-exporter", "--help"] ############################################# # final-static ############################################# -FROM gcr.io/distroless/static as final-static +FROM gcr.io/distroless/static AS final-static ENV LOG_JSON=1 WORKDIR / COPY --from=test /app . diff --git a/go.mod b/go.mod index db6704c..cb0d623 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module github.com/webdevops/azure-metrics-exporter -go 1.22.0 - -toolchain go1.23.1 +go 1.23 require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0