Skip to content

Commit

Permalink
chore: support go 1.23 (#1160)
Browse files Browse the repository at this point in the history
* chore: support go 1.23

* fix: whitespace

* chore: apply suggestions from code review

Co-authored-by: Samruddhi Khandale <[email protected]>

* chore: changes according to reviews

---------

Co-authored-by: Samruddhi Khandale <[email protected]>
  • Loading branch information
42atomys and samruddhikhandale authored Aug 16, 2024
1 parent c832366 commit b72835d
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/go/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG VARIANT=1.22-bookworm
ARG VARIANT=1.23-bookworm
FROM golang:${VARIANT}

# [Optional] Uncomment the next line to use go get to install anything else you need
Expand Down
12 changes: 6 additions & 6 deletions src/go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
| *Categories* | Core, Languages |
| *Definition type* | Dockerfile |
| *Published images* | mcr.microsoft.com/devcontainers/go |
| *Available image variants* | 1 / 1-bookworm, 1.22 / 1.22-bookworm, 1.21 / 1.21-bookworm, 1-bullseye, 1.22-bullseye, 1.21-bullseye ([full list](https://mcr.microsoft.com/v2/devcontainers/go/tags/list)) |
| *Available image variants* | 1 / 1-bookworm, 1.23 / 1.23-bookworm, 1.22 / 1.22-bookworm, 1-bullseye, 1.22-bullseye, 1.21-bullseye ([full list](https://mcr.microsoft.com/v2/devcontainers/go/tags/list)) |
| *Published image architecture(s)* | x86-64, arm64/aarch64 for `bookworm`, and `bullseye` variants |
| *Container host OS support* | Linux, macOS, Windows |
| *Container OS* | Debian |
Expand All @@ -24,18 +24,18 @@ You can directly reference pre-built versions of `Dockerfile` by using the `imag

- `mcr.microsoft.com/devcontainers/go` (latest)
- `mcr.microsoft.com/devcontainers/go:1` (or `1-bookworm`, `1-bullseye` to pin to an OS version)
- `mcr.microsoft.com/devcontainers/go:1.23` (or `1.23-bookworm`, `1.23-bullseye` to pin to an OS version)
- `mcr.microsoft.com/devcontainers/go:1.22` (or `1.22-bookworm`, `1.22-bullseye` to pin to an OS version)
- `mcr.microsoft.com/devcontainers/go:1.21` (or `1.21-bookworm`, `1.21-bullseye` to pin to an OS version)

Refer to [this guide](https://containers.dev/guide/dockerfile) for more details.

You can decide how often you want updates by referencing a [semantic version](https://semver.org/) of each image. For example:

- `mcr.microsoft.com/devcontainers/go:1-1.22` (or `1-1.22-bookworm`, `1-1.22-bullseye`)
- `mcr.microsoft.com/devcontainers/go:1.1-1.22` (or `1.1-1.22-bookworm`, `1.1-1.22-bullseye`)
- `mcr.microsoft.com/devcontainers/go:1.1.9-1.22` (or `1.1.9-1.22-bookworm`, `1.1.9-1.22-bullseye`)
- `mcr.microsoft.com/devcontainers/go:1-1.23` (or `1-1.23-bookworm`, `1-1.23-bullseye`)
- `mcr.microsoft.com/devcontainers/go:1.2-1.23` (or `1.2-1.23-bookworm`, `1.2-1.23-bullseye`)
- `mcr.microsoft.com/devcontainers/go:1.2.0-1.23` (or `1.2.0-1.23-bookworm`, `1.2.0-1.23-bullseye`)

However, we only do security patching on the latest [non-breaking, in support](https://github.com/devcontainers/images/issues/90) versions of images (e.g. `1-1.22`). You may want to run `apt-get update && apt-get upgrade` in your Dockerfile if you lock to a more specific version to at least pick up OS security updates.
However, we only do security patching on the latest [non-breaking, in support](https://github.com/devcontainers/images/issues/90) versions of images (e.g. `1-1.23`). You may want to run `apt-get update && apt-get upgrade` in your Dockerfile if you lock to a more specific version to at least pick up OS security updates.

See [history](history) for information on the contents of each version and [here for a complete list of available tags](https://mcr.microsoft.com/v2/devcontainers/go/tags/list).

Expand Down
45 changes: 29 additions & 16 deletions src/go/manifest.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,37 @@
{
"version": "1.1.15",
"variants": [
"1.22-bookworm",
"1.21-bookworm",
"1.22-bullseye",
"1.21-bullseye"
"1.23-bookworm",
"1.22-bookworm",
"1.21-bookworm",
"1.23-bullseye",
"1.22-bullseye",
"1.21-bullseye"
],
"build": {
"latest": "1.22-bookworm",
"latest": "1.23-bookworm",
"rootDistro": "debian",
"tags": [
"go:${VERSION}-${VARIANT}"
],
"architectures": {
"1.22-bookworm": [
"1.23-bookworm": [
"linux/amd64",
"linux/arm64"
],
"1.21-bookworm": [
"1.22-bookworm": [
"linux/amd64",
"linux/arm64"
],
"1.22-bullseye": [
"1.21-bookworm": [
"linux/amd64",
"linux/arm64"
],
"1.23-bullseye": [
"linux/amd64",
"linux/arm64"
],
"1.22-bullseye": [
"linux/amd64",
"linux/arm64"
],
Expand All @@ -31,17 +41,20 @@
]
},
"variantTags": {
"1.22-bookworm": [
"go:${VERSION}-1.22",
"1.23-bookworm": [
"go:${VERSION}-1.23",
"go:${VERSION}-1",
"go:${VERSION}-1-bookworm",
"go:${VERSION}-bookworm"
],
"1.22-bullseye": [
"1.22-bookworm": [
"go:${VERSION}-1.22"
],
"1.23-bullseye": [
"go:${VERSION}-1-bullseye",
"go:${VERSION}-bullseye"
],
"1.21-bookworm": [
"1.21-bookworm": [
"go:${VERSION}-1.21"
]
}
Expand Down Expand Up @@ -79,8 +92,8 @@
"cgIgnore": true
}
},
"other": {
"git": {}
}
"other": {
"git": {}
}
}
}
}

0 comments on commit b72835d

Please sign in to comment.