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

Add support for pushing separately from building (docker buildx push) #2956

Open
solidDoWant opened this issue Jan 29, 2025 · 3 comments
Open
Labels
kind/enhancement New feature or request status/triage

Comments

@solidDoWant
Copy link

Description

Request: buildx should support pushing built manifests separately from the build process. There should be a buildx equivalent of docker push, probably docker buildx push.

Use cases:

Workarounds (all painful):

The previous issue (#1152) got converted to a discussion (#2718) because the initial prompt was a question. To be clear, I'm not asking for alternatives with this issue - I'm asking for built-in buildx support.

@tonistiigi
Copy link
Member

Buildx is a CLI for BuildKit builders and BuildKit does not provide APIs for image store (create/delete/list images). You can't have buildx push without having buildx images ls, buildx images rm etc. at least as well and unlike build cache, image storage needs to be actively maintained by the user as it can't be garbage collected. Many other tools exist for storing images, like Docker daemon, Containerd, Container registry etc. and Buildx integrates with all of them. Additionally buildx allows exporting images to OCI layout where you can manage it as immutable files.

@solidDoWant
Copy link
Author

To be frank, as a consumer of the tool, the underlying implementation of this feature (whether it be via something that the CLI tool handles, buildkit handles, or the tools that buildkit integrates with) isn't really important to me. What is important to me (again, purely as a user) is that I am able to use the tool for the aforementioned use cases.

Myself and at least 40 other people see the need for this, making it the third most requested issue currently open, and 6th of all time.

For what it's worth, I'm not opposed to having buildx images {ls,rm} etc. commands, and I'm not opposed to managing cleanup of old images. The above uses cases would also be satisfied if docker push could push manifests + referenced images. Any of these options work, so long as manifests/images created via docker buildx can be pushed after being built, separately from being built.

@tonistiigi
Copy link
Member

The above uses cases would also be satisfied if docker push could push manifests + referenced images.

It can, with containerd image store https://docs.docker.com/desktop/features/containerd/ https://docs.docker.com/engine/storage/containerd/ . Asking why this is not default is completely valid, but not in the scope of this repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request status/triage
Projects
None yet
Development

No branches or pull requests

2 participants