Skip to content

Improve error message when target architecture doesn't match daemon#2530

Draft
rohansood10 wants to merge 2 commits intobuildpacks:mainfrom
rohansood10:fix/2428-improve-arch-mismatch-error
Draft

Improve error message when target architecture doesn't match daemon#2530
rohansood10 wants to merge 2 commits intobuildpacks:mainfrom
rohansood10:fix/2428-improve-arch-mismatch-error

Conversation

@rohansood10
Copy link

Summary

Improves the error message when saving a builder or buildpack to the local Docker daemon with a target that doesn't match the daemon's os/architecture.

Before

ERROR: could not find a target that matches daemon os=linux and architecture=arm64

After

ERROR: the requested target(s) 'linux/amd64' do not match the local Docker daemon's os='linux' and architecture='arm64'; to build for a different architecture, use the --publish flag to save the image to a registry instead of the daemon (a local registry can be used for testing purposes)

Changes

  • Updated daemonTarget() in pkg/client/package_buildpack.go to provide a more descriptive error message that includes the requested targets and suggests using --publish as a workaround
  • Updated related tests

Fixes #2428

When saving a builder or buildpack to the local Docker daemon with a
target that doesn't match the daemon's os/architecture, the error
message was unclear about the root cause and offered no guidance.

The improved error message now:
- Shows the requested target(s) that don't match
- Clearly states the daemon's os and architecture
- Suggests using --publish flag with a registry as a workaround
- Mentions that a local registry can be used for testing

Fixes buildpacks#2428

Signed-off-by: rohansood10 <rohansood10@users.noreply.github.com>
@github-actions github-actions bot added this to the 0.41.0 milestone Feb 19, 2026
@github-actions github-actions bot added the type/enhancement Issue that requests a new feature or improvement. label Feb 19, 2026
When building in quiet mode, the containerd storage warning should not
be displayed. This fix checks if quiet mode is enabled before printing
the warning message.

Signed-off-by: rohansood10 <rohansood10@users.noreply.github.com>
@rohansood10 rohansood10 force-pushed the fix/2428-improve-arch-mismatch-error branch from 64cd5ae to 768f23d Compare March 3, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/enhancement Issue that requests a new feature or improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve the error message when trying to save a builder in the docker daemon but the architecture doesn't match

1 participant