1---2name: frb-upgrade-docker3description: Upgrade and publish the flutter_rust_bridge development Docker image, including toolchain bumps, image build fixes, candidate tags, and default-branch promotion.4---56# 1 Scope the PR78- Put every development-image upgrade in an independent PR targeting `master`. Make it the first PR in a toolchain-upgrade chain.9- Include all Docker-owned changes required by the upgrade:10 - `.devcontainer/Dockerfile` toolchain and system packages;11 - `.github/workflows/publish_dev_docker.yaml` build, test, and publication logic;12 - image metadata tests, tag derivation, and Docker-specific supporting code.13- Leave FRB runtime fixes, generated scaffolds, and example migrations to later PRs.14- Read `frb-docker` for local use and `frb-dev-env` before running repository commands in a container.1516# 2 Build before merge1718- Before pushing the Docker upgrade PR, follow `frb-docker`'s local Dockerfile validation workflow with a freshly19 built image. Do not validate with a stale per-worktree container.20- Make Dockerfile and publish-workflow PRs automatically build and smoke-test native `linux/amd64` and `linux/arm64` images with `push: false`.21- Do not expose registry credentials to untrusted pull-request code.22- Derive image tags from Dockerfile `ARG` values instead of duplicating versions.23- Verify Flutter, Dart, Rust, the pinned nightly and wasm target, Node, Yarn, `wasm-pack`, Chrome, ChromeDriver, and `./frb_internal --help`.24- For a manual build-only check, run:2526```shell27gh workflow run publish_dev_docker.yaml --ref <branch> -f publish=false28```2930# 3 Publish safely3132- If later PRs need the image before merge, let a maintainer explicitly publish only an immutable33 `candidate-pr-<number>-sha-<short_sha>` tag. Reject a conflicting existing tag; allow only an identical retry.34- Never update `latest`, canonical version tags, or stable SHA tags from pull-request code.35- Publish stable tags only from a push to `master`. A manual stable dispatch must check out the current remote36 `master` head, not an older reachable commit.37- After merge, publish from `master`:3839```shell40gh workflow run publish_dev_docker.yaml --ref master41```4243- Stable publication may then update:44 - `latest`;45 - `flutter-<flutter>-rust-<rust>-nightly-<nightly>`;46 - the version-plus-code and stable SHA tags.4748# 4 Verify and hand off4950- Inspect the candidate when used, then inspect the canonical tag and `latest` after merge:5152```shell53docker buildx imagetools inspect fzyzcjy/flutter_rust_bridge_dev:<tag>54docker inspect fzyzcjy/flutter_rust_bridge_dev:latest \55 --format '{{ index .Config.Labels "org.opencontainers.image.revision" }}'56```5758- Require `linux/amd64` and `linux/arm64`; ignore BuildKit attestation entries reported as `unknown/unknown`.59- Merge latest `master` into the remaining chain, switch it from any candidate to the canonical tag, and do not merge60 a consumer before that tag exists.61- Diagnose Docker Hub login, per-platform pushes, and manifest creation separately.62- If local `latest` is stale, use the exact candidate/canonical tag or build the Dockerfile locally; do not generate63 locks or scaffolds with the wrong toolchain.