Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove load with multi-platform #282

Merged
merged 2 commits into from
Jul 7, 2023
Merged

Conversation

brivu
Copy link
Contributor

@brivu brivu commented Jul 7, 2023

Due to a limitation with docker buildx found here, users get the following error when trying to build an image with multiple platforms without pushing it:

error: docker exporter does not currently support exporting manifest lists

Currently, when a user sets the push_image parameter to false, the --load flag is automatically applied to the docker buildx command.

The --load flag is a shorthand for the combination of --output=type=docker and --push=false flags. It it instructs Docker Buildx to build the image and store it directly in the local Docker daemon without pushing it to a registry. This allows users to use the image immediately on their local machine without the need to push it to a remote registry.

However, the --load flag is not supported with multi-platform builds, resulting in the error above. To fix this issue, the --load is only set when push_image is set to false and the number of platforms is one.

@brivu brivu requested a review from a team as a code owner July 7, 2023 00:06
@brivu brivu self-assigned this Jul 7, 2023
@brivu brivu linked an issue Jul 7, 2023 that may be closed by this pull request
Copy link
Contributor

@KyleTryon KyleTryon left a comment

Choose a reason for hiding this comment

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

Looks good!

@brivu brivu merged commit 73c1dab into master Jul 7, 2023
2 checks passed
@brivu brivu deleted the fix/load-with-multi-platform branch July 7, 2023 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to build ARM image
2 participants