containers / buildah

A tool that facilitates building OCI images.
https://buildah.io
Apache License 2.0
7.35k stars 776 forks source link

[Feature]: Add support for "buildx build --push" and/or "buildx build --output=type=registry" #4671

Open matskiv opened 1 year ago

matskiv commented 1 year ago

Feature request description

Please add support for the "buildx build --push" and/or "buildx build --output=type=registry" flags which would ensure that the built image is pushed to the registry. According to the buildx reference, the --push flag is just shorthand for --output=type=registry. So IMHO implementing both these things would be ideal, but I will be happy with either one.

Suggest potential solution

A clear and concise description of what you want to happen.

Have you considered any alternatives?

When using the CLI manually, I can of course use a separate command to push the image, this feature would help in integration with other tools - I am using DevSpace CLI tool which, in some cases, calls docker build build via CLI, and it relies on the --push flag. And so far this is the only compatibility problem that I found when using podman(with podman-docker).

Additional context

I may be able to contribute a PR if you think this is not to complex, and can give me a couple of pointers in the right direction. :)

rhatdan commented 1 year ago

Would love to get a commit from you. You should be able to do most of this in cmd/podman/images/build.go and buildx.go

github-actions[bot] commented 1 year ago

A friendly reminder that this issue had no activity for 30 days.

rhatdan commented 1 year ago

@flouthoc got some time to look at this?

flouthoc commented 1 year ago

I'll take a look at this.

danishprakash commented 1 year ago

@flouthoc If you haven't started already, I'd like to take a shot at this.

flouthoc commented 1 year ago

@danishprakash Sure feel free to take it.

flouthoc commented 1 year ago

@danishprakash In case if you go short on time, feel free to assign it back to me anytime :)

danishprakash commented 1 year ago

You should be able to do most of this in cmd/podman/images/build.go and buildx.go

Just starting here but shouldn't this be moved to containers/buildah given the actual changes would be made there and perhaps the flags to be moved here once that's done? Or am I missing something?

github-actions[bot] commented 1 year ago

A friendly reminder that this issue had no activity for 30 days.

rhatdan commented 1 year ago

@danishprakash @flouthoc What is the state of this one?

danishprakash commented 1 year ago

Could you take a look at some of my comments on the PR for this? Whenever you've a moment, thanks!

github-actions[bot] commented 1 year ago

A friendly reminder that this issue had no activity for 30 days.

flouthoc commented 1 year ago

Being Implemented here: https://github.com/containers/buildah/pull/4677

github-actions[bot] commented 1 year ago

A friendly reminder that this issue had no activity for 30 days.