buildah icon indicating copy to clipboard operation
buildah copied to clipboard

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

Open matskiv opened this issue 1 year ago • 14 comments

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. :)

matskiv avatar Feb 02 '23 17:02 matskiv

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

rhatdan avatar Feb 03 '23 22:02 rhatdan

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

github-actions[bot] avatar Mar 06 '23 00:03 github-actions[bot]

@flouthoc got some time to look at this?

rhatdan avatar Mar 06 '23 01:03 rhatdan

I'll take a look at this.

flouthoc avatar Mar 06 '23 05:03 flouthoc

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

danishprakash avatar Mar 10 '23 14:03 danishprakash

@danishprakash Sure feel free to take it.

flouthoc avatar Mar 10 '23 15:03 flouthoc

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

flouthoc avatar Mar 10 '23 15:03 flouthoc

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?

danishprakash avatar Mar 17 '23 13:03 danishprakash

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

github-actions[bot] avatar Apr 17 '23 00:04 github-actions[bot]

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

rhatdan avatar Apr 21 '23 00:04 rhatdan

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

danishprakash avatar Apr 21 '23 06:04 danishprakash

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

github-actions[bot] avatar May 22 '23 00:05 github-actions[bot]

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

flouthoc avatar May 27 '23 04:05 flouthoc

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

github-actions[bot] avatar Jun 27 '23 00:06 github-actions[bot]