fix: pass build platform to Docker pull to avoid tarball fallback#436
Merged
PedroGuerraPT merged 1 commit intomainfrom Feb 23, 2026
Merged
Conversation
jacobwgillespie
approved these changes
Feb 23, 2026
When using --build-platform=linux/amd64 on an arm64 host, the Docker pull defaulted to the host architecture (arm64) and failed with "no matching manifest for linux/arm64/v8", causing a slow tarball fallback. Pass --build-platform as the pull platform so Docker requests the correct architecture manifest from the registry.
a5c248e to
a1d6de5
Compare
jacobwgillespie
approved these changes
Feb 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
depot bake --build-platform=linux/amd64 --loadon an arm64 Mac, the Docker pull defaults to the host architecture (arm64) and fails with "no matching manifest for linux/arm64/v8", causing a slow tarball fallback--build-platformflag controls which builder machine is used but was never passed through to the DockerImagePullcall, so Docker didn't know which architecture to request from the registryBuildPlatformtoDepotLoadOptionsand uses it as a fallback platform whenbuildOpt.Platforms(the composeplatformsfield) is emptyChanges
pkg/load/cli.go— addedBuildPlatformfield toDepotLoadOptions; whenbuildOpt.Platformsis empty and--build-platformis set, pass it as the pull platformpkg/buildx/commands/bake.go— passbuildPlatformthrough toDepotLoadOptionspkg/buildx/commands/build.go— passbuildPlatformthrough toDepotLoadOptionsTest plan
depot bake --build-platform=linux/amd64 --loadon arm64 Mac now pulls withplatform="linux/amd64"and avoids tarball fallbackplatformsfield still use that value (takes precedence)Fixes DEP-3616