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

RFE: cli plugin support? #5802

Closed
christian-korneck opened this issue Apr 13, 2020 · 25 comments
Closed

RFE: cli plugin support? #5802

christian-korneck opened this issue Apr 13, 2020 · 25 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. stale-issue

Comments

@christian-korneck
Copy link

I'm new to podman and have a quick question: Does podman support CLI plugins, similar to the Docker CLI? If so it would be great if someone could point me to a starting point like docs or an example. (If not I would still appreciate a quick confirmation - it'll save me some time from digging into the sources).

(Background: I have some homebrew Docker CLI plugins and would like to find out if/how I could use them with podman).

Thanks a lot in advance!

@mheon
Copy link
Member

mheon commented Apr 13, 2020

We do not at present support CLI plugins, sorry.

@christian-korneck
Copy link
Author

@mheon thanks for clarifying!

@rhatdan
Copy link
Member

rhatdan commented Apr 13, 2020

What exactly do you do with a CLI Plugin?

@christian-korneck
Copy link
Author

christian-korneck commented Apr 13, 2020

Small convenience things that I was missing from the Docker CLI. For example I have a plugin pushrm which pushes the README.md from the current dir to the registry (with support for Dockerhub, quay, harbor). So I can run something like this to push the image and update the repo description in one go:

docker push docker.io/foo/foo:bar && docker pushrm docker.io/foo/foo

I use it both interactively and in CI jobs. It uses registry creds from the Docker credentials store, so it made sense at the time to make it a Docker CLI plugin (instead of a standalone tool).

@TomSweeneyRedHat
Copy link
Member

hmm, sounds like a good RFE to me if someone wanted to run with it. Maybe we should add RFE to the title of this and open it up for someone to dive into?

@christian-korneck christian-korneck changed the title cli plugin support? RFE: cli plugin support? Apr 14, 2020
@christian-korneck
Copy link
Author

Maybe we should add RFE to the title of this and open it up for someone to dive into?

Done. Thanks for supporting this!

@rhatdan
Copy link
Member

rhatdan commented Apr 14, 2020

Sure this is an open project. If we can get a contributor to work on this, we would welcome the addition.

@github-actions
Copy link

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

@rhatdan
Copy link
Member

rhatdan commented May 15, 2020

@christian-korneck Any movement on this?

@christian-korneck
Copy link
Author

no, not from my side so far

@rhatdan
Copy link
Member

rhatdan commented Jun 9, 2020

@QiWang19 Could you take a look at this?

@rhatdan
Copy link
Member

rhatdan commented Sep 10, 2020

@QiWang19 Did you ever get a chance to look at this?

@rhatdan rhatdan added kind/feature Categorizes issue or PR as related to a new feature. and removed stale-issue labels Oct 7, 2020
@github-actions
Copy link

github-actions bot commented Nov 8, 2020

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

@rhatdan
Copy link
Member

rhatdan commented Nov 10, 2020

We have found little interest in this from the community and it is not likely to be a priority for the development team.

@christian-korneck
Copy link
Author

thanks, close

@christian-korneck
Copy link
Author

just to add some infos to this (already closed) issue: CLI Plugin support in Docker is now deprecated and the spec (linked above) has been removed from the docs (last version is here). It looks like Docker has moved to a different model: In recent versions of Docker Desktop the "docker" executable is now a closed source wrapper around the original (now renamed) docker CLI that provides additional features (cloud integrations)).

I still find CLI plugins useful (many CLIs support them, kubectl has nice docs about the usecase). Generally speaking when a tool has a hard dependency on interfaces provided by the host tool (i.e. its API, credentials store, etc) and won't really work standalone imho it makes sense to make it a CLI plugin. (If I find time for a PR (unlikely soon) I'll reopen this issue).

@kriansa
Copy link

kriansa commented Sep 28, 2021

Well, that's weird. Although the support for CLI plugins is deprecated, the new Compose V2 is relying on it to work -- and it just got released: https://github.com/docker/compose/releases/tag/v2.0.0

docker-compose is simply broken now and a quick fix is to do a simple shell alias:

alias docker-compose="/usr/lib/docker/cli-plugins/docker-compose compose"

But that's not guaranteed to work with podman as I just tested and build command doesn't work 😢

@christian-korneck
Copy link
Author

yep, also Docker Desktop still ships with several CLI plugins. So I have some hope the interface for it won’t go away in the nearest future. (But I could be wrong).

Unrelated, I still don’t think CLI plug-ins for Podman would be a bad idea. Other CLIs like git or kubectl have such interfaces, too (and I personally use them quite a bit).

@kriansa
Copy link

kriansa commented Sep 28, 2021

@christian-korneck I agree that regardless of docker current state, podman could indeed support that kind of interface extensibility -- I'm also a user of kubectl and git plugins myself and I found it super useful to simply write a quick bash script and easily turn it into a subcommand.

I know this issue didn't get community traction when you first opened it, but I believe that it might get prioritized if Compose V2 integration is still desired.

@christian-korneck
Copy link
Author

with podman [...] Compose V2 [...] docker-compose compose build command doesn't work

did you activate the Podman Docker socket?
https://www.redhat.com/sysadmin/podman-docker-compose

@kriansa
Copy link

kriansa commented Sep 29, 2021

Yes I did. Is it working on your end?

@jerdna-regeiz
Copy link

with podman [...] Compose V2 [...] docker-compose compose build command doesn't work

did you activate the Podman Docker socket? https://www.redhat.com/sysadmin/podman-docker-compose

I got it to run with docker-compose v2, but it requires the docker cli to be installed

docker -H unix:///run/user/1000/podman/podman.sock compose build 

To note: the -H is now a parameter for the docker cli itself and the compose cmd does not know anything about -H

@rhatdan
Copy link
Member

rhatdan commented Dec 16, 2021

We need to look at how we can get podman to directly run compose.

@kriansa
Copy link

kriansa commented Dec 18, 2021

@rhatdan this discussion might be of interest, since the future of compose as a standalone tool might be compromised depending on their internal decision. We all know compose is a ubiquitous tool in the ecosystem and it would not be great if its codebase eventually gets merged onto docker-cli (forks are not ideal IMHO).

@rhatdan
Copy link
Member

rhatdan commented Dec 21, 2021

Yes I am not sure we would ever add a CLI plugin interface. But supporting docker-compose as it evolves is something we hope to be able to maintain.

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. stale-issue
Projects
None yet
Development

No branches or pull requests

7 participants