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

Buildx 0.10.0 giving additional manifest to docker image? #1507

Closed
martadinata666 opened this issue Jan 11, 2023 · 10 comments
Closed

Buildx 0.10.0 giving additional manifest to docker image? #1507

martadinata666 opened this issue Jan 11, 2023 · 10 comments

Comments

@martadinata666
Copy link

martadinata666 commented Jan 11, 2023

I saw notable changes on 0.10.0 about

Notable changes

I think one of the notable somehow create some unknown manifest?

2023-01-11-112838_1051x273_scrot

I tried BUILDX_GIT_INFO=0 but doesnt affect. My question is, what is the correct way to disable it?

Thanks.

@debu99
Copy link

debu99 commented Jan 11, 2023

i got null manifest push

@crazy-max
Copy link
Member

Looks related to #1509 (comment)

@jedevc
Copy link
Collaborator

jedevc commented Jan 11, 2023

This is the new provenance feature, which is enabled by default - you can get the contents using buildx imagetools:

$ docker buildx imagetools inspect <your-image> --format '{{ json .Provenance }}'

To disable it on build, you can explicitly set --provenance=false. You can find out more in the docs here.

@debu99
Copy link

debu99 commented Jan 11, 2023

so sad, this default value broken our pipeline which follow the page https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/, the docker manifest create ... will fail

@jedevc
Copy link
Collaborator

jedevc commented Jan 11, 2023

@debu99, thanks for the feedback 👍

The article you link to is slightly out of date at this point - while it does work, you might also be interested in being able to do multi-platform builds even more simply using buildx: https://docs.docker.com/build/building/multi-platform/

@thaJeztah
Copy link
Member

@debu99 the docker manifest approach is using the experimental manifest subcommands; and the blogpost was written when buildx was still in the experimental state; you may be interested in this page; https://docs.docker.com/build/building/multi-platform/ - effectively buildkit would be able to construct a multi-arch image in one go.

@jedevc
Copy link
Collaborator

jedevc commented Jan 11, 2023

@thaJeztah jinx 🎉

@debu99
Copy link

debu99 commented Jan 11, 2023

we tried binfmt_misc but eventually give up this way as some image build time is too long and can't accept, so now we build different image on correspondence instance, and in the last step to create manifest, looks like --provenance=false is better for our usecase

@jedevc
Copy link
Collaborator

jedevc commented Jan 11, 2023

To merge manually, I'd recommend still using buildx:

$ docker buildx imagetools create -t <dest> <source1> <source2> <source3> ...

If you're building using buildx, it makes sense to do the merge using it as well - specifically it properly handles merging indexes correctly. I think for your use case, it should be a drop-in replacement.

@debu99, you can also do native builds using the --platform flag - it only requires that you create a buildx builder that contains multiple nodes that you can then connect out to: https://docs.docker.com/engine/reference/commandline/buildx_create/.

@martadinata666
Copy link
Author

martadinata666 commented Jan 11, 2023

coming from docker/build-push-action#755, as it actions builds that may lead to different solving method.

I agree with such feature, it just caught me surprised that some unknown shown when looking on docker hub image tags page.

In my comprehension, revert to 0.9.1 or add --provenance=false will be the solution right now.

Thanks for detailed informations.

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

No branches or pull requests

5 participants