From fd39f06e0c7b65abc31e181214d3f3d335721192 Mon Sep 17 00:00:00 2001 From: Quang Nguyen Date: Wed, 11 Sep 2024 06:03:07 -0400 Subject: [PATCH 1/2] chore: update Go version to 1.23.1 --- controller/Dockerfile | 4 ++-- controller/Dockerfile.gogen | 4 ++-- controller/Dockerfile.proto | 4 ++-- controller/Dockerfile.windows-2019 | 4 ++-- controller/Dockerfile.windows-2022 | 4 ++-- controller/Dockerfile.windows-cgo | 4 ++-- controller/Dockerfile.windows-native | 4 ++-- go.mod | 2 +- operator/Dockerfile | 4 ++-- operator/Dockerfile.windows-2019 | 4 ++-- operator/Dockerfile.windows-2022 | 4 ++-- test/image/Dockerfile | 4 ++-- 12 files changed, 23 insertions(+), 23 deletions(-) diff --git a/controller/Dockerfile b/controller/Dockerfile index d4ed1eef85..d1c4cf27b4 100644 --- a/controller/Dockerfile +++ b/controller/Dockerfile @@ -2,8 +2,8 @@ ARG OS_VERSION # pinned base images -# mcr.microsoft.com/oss/go/microsoft/golang:1.22.4-1-cbl-mariner2.0 -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:62b5953c2bee60b39d2b0505fb073b1f06ec3aaec34e44e9807cb8af85f53622 AS golang +# mcr.microsoft.com/oss/go/microsoft/golang:1.23.1-cbl-mariner2.0 +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:dcd95cadab21a855894c599c9e26bfb2179aa08e7d7f99c0e8546167712ba6ef AS golang # mcr.microsoft.com/cbl-mariner/base/core:2.0 FROM --platform=$TARGETPLATFORM mcr.microsoft.com/cbl-mariner/base/core@sha256:77651116f2e83cf50fddd8a0316945499f8ce6521ff8e94e67539180d1e5975a AS mariner-core diff --git a/controller/Dockerfile.gogen b/controller/Dockerfile.gogen index a8dff656b4..833af2384a 100644 --- a/controller/Dockerfile.gogen +++ b/controller/Dockerfile.gogen @@ -1,5 +1,5 @@ -# mcr.microsoft.com/oss/go/microsoft/golang:1.22.4-1-cbl-mariner2.0 -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:62b5953c2bee60b39d2b0505fb073b1f06ec3aaec34e44e9807cb8af85f53622 +# mcr.microsoft.com/oss/go/microsoft/golang:1.23.1-cbl-mariner2.0 +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:dcd95cadab21a855894c599c9e26bfb2179aa08e7d7f99c0e8546167712ba6ef # Default linux/architecture. diff --git a/controller/Dockerfile.proto b/controller/Dockerfile.proto index ada8ea3380..0189b19376 100644 --- a/controller/Dockerfile.proto +++ b/controller/Dockerfile.proto @@ -1,5 +1,5 @@ -# mcr.microsoft.com/oss/go/microsoft/golang:1.22.4-1-cbl-mariner2.0 -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:62b5953c2bee60b39d2b0505fb073b1f06ec3aaec34e44e9807cb8af85f53622 +# mcr.microsoft.com/oss/go/microsoft/golang:1.23.1-cbl-mariner2.0 +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:dcd95cadab21a855894c599c9e26bfb2179aa08e7d7f99c0e8546167712ba6ef LABEL Name=retina-builder Version=0.0.1 diff --git a/controller/Dockerfile.windows-2019 b/controller/Dockerfile.windows-2019 index b598ed2845..aae769e7bd 100644 --- a/controller/Dockerfile.windows-2019 +++ b/controller/Dockerfile.windows-2019 @@ -1,5 +1,5 @@ -# mcr.microsoft.com/oss/go/microsoft/golang:1.22.4-1-cbl-mariner2.0 -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:62b5953c2bee60b39d2b0505fb073b1f06ec3aaec34e44e9807cb8af85f53622 AS builder +# mcr.microsoft.com/oss/go/microsoft/golang:1.23.1-cbl-mariner2.0 +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:dcd95cadab21a855894c599c9e26bfb2179aa08e7d7f99c0e8546167712ba6ef AS builder # Build args ARG VERSION diff --git a/controller/Dockerfile.windows-2022 b/controller/Dockerfile.windows-2022 index 3ac86c43cc..05d0fa40ee 100644 --- a/controller/Dockerfile.windows-2022 +++ b/controller/Dockerfile.windows-2022 @@ -1,5 +1,5 @@ -# mcr.microsoft.com/oss/go/microsoft/golang:1.22.4-1-cbl-mariner2.0 -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:62b5953c2bee60b39d2b0505fb073b1f06ec3aaec34e44e9807cb8af85f53622 AS builder +# mcr.microsoft.com/oss/go/microsoft/golang:1.23.1-cbl-mariner2.0 +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:dcd95cadab21a855894c599c9e26bfb2179aa08e7d7f99c0e8546167712ba6ef AS builder # Build args diff --git a/controller/Dockerfile.windows-cgo b/controller/Dockerfile.windows-cgo index 91b21f72bf..11afdcb646 100644 --- a/controller/Dockerfile.windows-cgo +++ b/controller/Dockerfile.windows-cgo @@ -1,5 +1,5 @@ -# mcr.microsoft.com/oss/go/microsoft/golang:1.22.4-windowsservercore-ltsc2022 -FROM --platform=windows/amd64 mcr.microsoft.com/oss/go/microsoft/golang@sha256:c2548f33fe6e8d0663660cfb5279706288aa7a9f65df0029abb690e575126a25 AS cgo +# mcr.microsoft.com/oss/go/microsoft/golang:1.23.1-windowsservercore-ltsc2022 +FROM --platform=windows/amd64 mcr.microsoft.com/oss/go/microsoft/golang@sha256:e2d55093522b5f4a311494255d0598145b1f13da5ae2354a09c7f7c1355f3ad9 AS cgo SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] diff --git a/controller/Dockerfile.windows-native b/controller/Dockerfile.windows-native index 6689aee144..8224ed91d4 100644 --- a/controller/Dockerfile.windows-native +++ b/controller/Dockerfile.windows-native @@ -3,8 +3,8 @@ # buildx targets, and this one requires legacy build. # Maybe one day: https://github.com/moby/buildkit/issues/616 ARG BUILDER_IMAGE -# mcr.microsoft.com/oss/go/microsoft/golang:1.22.4-windowsservercore-ltsc2022 -FROM --platform=windows/amd64 mcr.microsoft.com/oss/go/microsoft/golang@sha256:c2548f33fe6e8d0663660cfb5279706288aa7a9f65df0029abb690e575126a25 AS builder +# mcr.microsoft.com/oss/go/microsoft/golang:1.23.1-windowsservercore-ltsc2022 +FROM --platform=windows/amd64 mcr.microsoft.com/oss/go/microsoft/golang@sha256:e2d55093522b5f4a311494255d0598145b1f13da5ae2354a09c7f7c1355f3ad9 AS builder WORKDIR C:\\retina COPY go.mod . COPY go.sum . diff --git a/go.mod b/go.mod index 9df184c30e..152b181d63 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/microsoft/retina -go 1.22.4 +go 1.23.1 require ( github.com/go-chi/chi/v5 v5.1.0 diff --git a/operator/Dockerfile b/operator/Dockerfile index 2652af356b..731423eaf8 100644 --- a/operator/Dockerfile +++ b/operator/Dockerfile @@ -1,5 +1,5 @@ -# mcr.microsoft.com/oss/go/microsoft/golang:1.22.4-1-cbl-mariner2.0 -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:62b5953c2bee60b39d2b0505fb073b1f06ec3aaec34e44e9807cb8af85f53622 AS builder +# mcr.microsoft.com/oss/go/microsoft/golang:1.23.1-cbl-mariner2.0 +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:dcd95cadab21a855894c599c9e26bfb2179aa08e7d7f99c0e8546167712ba6ef AS builder ARG VERSION diff --git a/operator/Dockerfile.windows-2019 b/operator/Dockerfile.windows-2019 index f879475a58..3f664bc219 100644 --- a/operator/Dockerfile.windows-2019 +++ b/operator/Dockerfile.windows-2019 @@ -1,5 +1,5 @@ -# mcr.microsoft.com/oss/go/microsoft/golang:1.22.4-1-cbl-mariner2.0 -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:62b5953c2bee60b39d2b0505fb073b1f06ec3aaec34e44e9807cb8af85f53622 AS builder +# mcr.microsoft.com/oss/go/microsoft/golang:1.23.1-cbl-mariner2.0 +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:dcd95cadab21a855894c599c9e26bfb2179aa08e7d7f99c0e8546167712ba6ef AS builder # Build args diff --git a/operator/Dockerfile.windows-2022 b/operator/Dockerfile.windows-2022 index ce6ec8ef38..02e7e37c5a 100644 --- a/operator/Dockerfile.windows-2022 +++ b/operator/Dockerfile.windows-2022 @@ -1,5 +1,5 @@ -# mcr.microsoft.com/oss/go/microsoft/golang:1.22.4-1-cbl-mariner2.0 -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:62b5953c2bee60b39d2b0505fb073b1f06ec3aaec34e44e9807cb8af85f53622 AS builder +# mcr.microsoft.com/oss/go/microsoft/golang:1.23.1-cbl-mariner2.0 +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:dcd95cadab21a855894c599c9e26bfb2179aa08e7d7f99c0e8546167712ba6ef AS builder # Build args diff --git a/test/image/Dockerfile b/test/image/Dockerfile index d760a431e1..5904c748cc 100644 --- a/test/image/Dockerfile +++ b/test/image/Dockerfile @@ -1,6 +1,6 @@ # build stage -# mcr.microsoft.com/oss/go/microsoft/golang:1.22.4-1-cbl-mariner2.0 -FROM mcr.microsoft.com/oss/go/microsoft/golang@sha256:62b5953c2bee60b39d2b0505fb073b1f06ec3aaec34e44e9807cb8af85f53622 AS builder +# mcr.microsoft.com/oss/go/microsoft/golang:1.23.1-cbl-mariner2.0 +FROM mcr.microsoft.com/oss/go/microsoft/golang@sha256:dcd95cadab21a855894c599c9e26bfb2179aa08e7d7f99c0e8546167712ba6ef AS builder ENV CGO_ENABLED=0 COPY . /go/src/github.com/microsoft/retina WORKDIR /go/src/github.com/microsoft/retina From 0902b5abe32287eb031648ac1ae28a7a1750b275 Mon Sep 17 00:00:00 2001 From: Quang Nguyen Date: Wed, 11 Sep 2024 17:00:05 -0400 Subject: [PATCH 2/2] uses go toolchain --- go.mod | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 152b181d63..bcfffe93bd 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module github.com/microsoft/retina -go 1.23.1 +go 1.22.7 + +toolchain go1.23.1 require ( github.com/go-chi/chi/v5 v5.1.0