Skip to content

feat(docker): support native multi-arch (amd64/arm64) builds#5096

Merged
jtmcdole merged 3 commits into
flutter:mainfrom
jtmcdole:linux_arm64
Jul 1, 2026
Merged

feat(docker): support native multi-arch (amd64/arm64) builds#5096
jtmcdole merged 3 commits into
flutter:mainfrom
jtmcdole:linux_arm64

Conversation

@jtmcdole

@jtmcdole jtmcdole commented Jul 1, 2026

Copy link
Copy Markdown
Member
  • Update Dockerfile.base to exclude prepackaged cache on arm64/aarch64 and trigger native SDK bootstrapping.
  • Exclude .pub-preload-cache by default on all architectures to optimize size.
  • Update Dockerfile to download yq dynamically based on target architecture.
  • Refactor cloudbuild.yaml to use docker buildx with QEMU emulation and direct manifest-list pushing.
  • Remove hardcoded amd64 platform constraints from docker-compose.yml.
  • Update README.md to document arm64 capabilities and simplify local commands.

fixes: flutter/flutter#188873

- Update Dockerfile.base to exclude prepackaged cache on arm64/aarch64 and trigger native SDK bootstrapping.
- Exclude .pub-preload-cache by default on all architectures to optimize size.
- Update Dockerfile to download yq dynamically based on target architecture.
- Refactor cloudbuild.yaml to use docker buildx with QEMU emulation and direct manifest-list pushing.
- Remove hardcoded amd64 platform constraints from docker-compose.yml.
- Update README.md to document arm64 capabilities and simplify local commands.

fixes: flutter/flutter#188873
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jul 1, 2026
@jtmcdole jtmcdole requested a review from zanderso July 1, 2026 17:50

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces multi-architecture support (linux/amd64 and linux/arm64) for the Flutter Docker environment by updating the Dockerfiles, README, docker-compose, and transitioning the Cloud Build pipeline to use Docker Buildx with QEMU. Feedback on these changes highlights critical issues in cloudbuild.yaml where using a static builder name across separate build steps will cause container name conflicts and build failures. Additionally, improvements are suggested to avoid unquoted variables for word-splitting in Dockerfile.base and to pin the yq binary to a specific version in Dockerfile to ensure deterministic builds.

Comment thread cloud_build/flutter_agy_docker/cloudbuild.yaml Outdated
Comment thread cloud_build/flutter_agy_docker/cloudbuild.yaml Outdated
Comment thread cloud_build/flutter_agy_docker/Dockerfile.base Outdated
Comment thread cloud_build/flutter_agy_docker/Dockerfile
@jtmcdole

jtmcdole commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

/gemini review again.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds multi-architecture support (linux/amd64 and linux/arm64) to the Flutter Docker development environment. It updates the Dockerfiles to dynamically handle architecture-specific downloads and cache exclusions, refactors the Cloud Build pipeline to build multi-arch images using docker buildx, and updates the documentation and docker-compose configuration. Feedback is provided to improve the robustness of local builds in Dockerfile.base by falling back to dpkg --print-architecture if TARGETARCH is not set.

Comment thread cloud_build/flutter_agy_docker/Dockerfile.base
@jtmcdole jtmcdole requested a review from eyebrowsoffire July 1, 2026 19:58
@jtmcdole jtmcdole merged commit 67ef3d4 into flutter:main Jul 1, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature request: flutter_agy_docker supports arm64

2 participants