Skip to content

Commit

Permalink
chore: update Go build image to 1.23.1 (#722)
Browse files Browse the repository at this point in the history
# Description

Bump go version in go.mod to 1.22.7 and use toolchain for 1.23.1 +
update build images to 1.23.1
## Related Issue

If this pull request is related to any issue, please mention it here.
Additionally, make sure that the issue is assigned to you before
submitting this pull request.

## Checklist

- [ ] I have read the [contributing
documentation](https://retina.sh/docs/contributing).
- [ ] I signed and signed-off the commits (`git commit -S -s ...`). See
[this
documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)
on signing commits.
- [ ] I have correctly attributed the author(s) of the code.
- [ ] I have tested the changes locally.
- [ ] I have followed the project's style guidelines.
- [ ] I have updated the documentation, if necessary.
- [ ] I have added tests, if applicable.

## Screenshots (if applicable) or Testing Completed

Please add any relevant screenshots or GIFs to showcase the changes
made.

## Additional Notes

Add any additional notes or context about the pull request here.

---

Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more
information on how to contribute to this project.
  • Loading branch information
nddq authored Sep 12, 2024
1 parent 5c4b4ae commit b0e498d
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 23 deletions.
4 changes: 2 additions & 2 deletions controller/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions controller/Dockerfile.gogen
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions controller/Dockerfile.proto
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions controller/Dockerfile.windows-2019
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions controller/Dockerfile.windows-2022
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions controller/Dockerfile.windows-cgo
Original file line number Diff line number Diff line change
@@ -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';"]

Expand Down
4 changes: 2 additions & 2 deletions controller/Dockerfile.windows-native
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/microsoft/retina

go 1.22.4
go 1.22.7

toolchain go1.23.1

require (
github.com/go-chi/chi/v5 v5.1.0
Expand Down
4 changes: 2 additions & 2 deletions operator/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions operator/Dockerfile.windows-2019
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions operator/Dockerfile.windows-2022
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/image/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit b0e498d

Please sign in to comment.