-
Notifications
You must be signed in to change notification settings - Fork 516
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
Comments
Buildx is a CLI for BuildKit builders and BuildKit does not provide APIs for image store (create/delete/list images). You can't have |
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 |
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. |
If a solution is implemented it would be nice for it to work declaratively with bake. When building multi-arch images, it would also allow to load images of current platform while making sure no layers are rebuilt. docker buildx bake --set '*.platform=linux/amd64,linux/arm64' [...] # --load won't work if many arch defined.
docker buildx bake --load [...] # need to load separately, it may rebuild layers when it shouldn't. |
What are your thoughts on #2718 (comment)? Cross posting here for visibility, I wonder if this is a valid approach or if it helps OP. This worked for me. |
@tom-stytch not super useful using bake. docker buildx bake [...] # build many images without push
# Before pushing, do tests, scan images, etc...
docker buildx bake --push [..] # Push all the images and tags, layers could be invalidated and rebuilt before push. There is still a way to do something like that with bake, but idk. docker buildx bake [...] # build many images without --push, assuming we use containerd store
# Do something before push
docker buildx bake --print \
| jq -r '.target[] | select(.tags != null) | .tags[]' \
| xargs -I {} docker push {}
# Note: push is not optimal as it will push each ref one by one. |
Description
Request:
buildx
should support pushing built manifests separately from the build process. There should be abuildx
equivalent ofdocker push
, probablydocker buildx push
.Use cases:
Workarounds (all painful):
docker build
+docker push
+docker manifest create
+docker manifest push
(the hard way)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.The text was updated successfully, but these errors were encountered: