From 71edc01069f25ed87b9e4845ce9be1de84595a97 Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Sun, 31 May 2026 18:28:53 +0200 Subject: [PATCH 1/2] Update deploy image to use Dart 3.12.1 --- cloud_build/firebase-ghcli/Dockerfile | 2 +- cloud_build/firebase-ghcli/README.md | 61 +++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 1 deletion(-) diff --git a/cloud_build/firebase-ghcli/Dockerfile b/cloud_build/firebase-ghcli/Dockerfile index cc32168a1fd..4f4cb8fb7ae 100644 --- a/cloud_build/firebase-ghcli/Dockerfile +++ b/cloud_build/firebase-ghcli/Dockerfile @@ -1,4 +1,4 @@ -FROM dart:3.12.0@sha256:3d1b19886b288807b42020ede8f1f9ea7753c91c17c27479ee9e7bf584289a34 +FROM dart:3.12.1@sha256:6440c7d5fd8713b0706d0b6190eb2be7ad896101e225fc9d7657034b23ab0592 RUN apt-get update && apt-get install -y --no-install-recommends curl gpg ca-certificates \ # Install the GitHub CLI. \ diff --git a/cloud_build/firebase-ghcli/README.md b/cloud_build/firebase-ghcli/README.md index 9978b3ee1c4..e3b6722d02e 100644 --- a/cloud_build/firebase-ghcli/README.md +++ b/cloud_build/firebase-ghcli/README.md @@ -18,3 +18,64 @@ When the `Dockerfile` file or `cloudbuild.yaml` template in this directory are changed in a PR, the cloud build template is triggered. Then a new version of the image is deployed as the latest version in Container Registry under the `flutter-dev-230821` project on Google Cloud. + +## Updating the Dart SDK version + +The base Dart image in `Dockerfile` is pinned by both tag and digest: + +```dockerfile +FROM dart:@sha256: +``` + +When updating the Dart SDK version, update both the tag and the digest. +Use the multi-platform image index digest for the tag. +Don't use a platform-specific digest, such as +the digest for only `linux/amd64` or only `linux/arm64/v8`. + +### Using `crane` + +If you have the `crane` CLI from [`google/go-containerregistry`][], run: + +```bash +crane digest docker.io/library/dart: +``` + +For example, the following command retrieves the digest for +the `3.12.1` stable release of the SDK: + +```bash +crane digest docker.io/library/dart:3.12.1 +``` + +Copy the returned `sha256:...` digest. +Then update the `FROM` line in the `Dockerfile` with +the new tag (version) and copied index digest. + +```dockerfile +FROM dart:3.12.1@ +``` + +Don't pass `--platform` when getting the digest for the `Dockerfile`. +Passing a platform returns the digest for that platform's child manifest +instead of the architecture-agnostic index digest. + +[`google/go-containerregistry`]: https://github.com/google/go-containerregistry + +### Using Docker Hub + +If you don't have `crane`, use the +[Dart image tags page on Docker Hub](https://hub.docker.com/_/dart/tags): + +1. Search for the new Dart SDK version tag, such as `3.12.1`. +1. Open the tag detail page by selecting the tag name or digest. +1. Ensure the opened tag page has a `MULTI-PLATFORM` badge. +1. Copy the specified `INDEX DIGEST` value. + It should start with `sha256:`. +1. Update the `FROM` line in the `Dockerfile` with + the new tag (SDK version) and index digest. + +Screenshot of the index digest on Docker Hub, outlined with a red box. From 3efbbd5780bdb58e0754e3891982ea69d3029ff1 Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Sun, 31 May 2026 18:41:33 +0200 Subject: [PATCH 2/2] Clarify digest argument Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- cloud_build/firebase-ghcli/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud_build/firebase-ghcli/README.md b/cloud_build/firebase-ghcli/README.md index e3b6722d02e..1f5593d4c04 100644 --- a/cloud_build/firebase-ghcli/README.md +++ b/cloud_build/firebase-ghcli/README.md @@ -24,7 +24,7 @@ Container Registry under the `flutter-dev-230821` project on Google Cloud. The base Dart image in `Dockerfile` is pinned by both tag and digest: ```dockerfile -FROM dart:@sha256: +FROM dart:@ ``` When updating the Dart SDK version, update both the tag and the digest.