-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
support CLI plugins #13461
Comments
If you have plugins in both directories, we execute the local ones? ~/.config/containers/cli-plugins? |
yes, I believe in the spec the spec does not mention anything about they have a colon separated XDG_DATA_DIRS that is to default to
|
Ok I guess your suggested directories work, since this would be specific to Podman as well. |
How should the API of such plugins look like? |
I think we should match the docker cli API. This would allow people to use docker cli plugins as well. |
Also see #5802 |
Is it documented somewhere? |
here basically it's an executable that accepts argument #! /bin/bash
# put this file in /usr/libexec/docker/cli-plugins/docker-demo
[ "x$1" == "xdocker-cli-plugin-metadata" ] && {
echo '{
"SchemaVersion": "0.1.0",
"Vendor": "Muayyad Alsadi",
"Version": "v0.0.1",
"ShortDescription": "Demo docker command"
}'
exit 0
}
export
echo got params "$@" |
Thanks! I just briefly skimmed the plugins code and am not entirely convinced that's something Podman should support. The documentation/specification really is in the code which is completely outside of our control. I am mostly afraid of a potential whack-a-mole and the maintenance burden. @muayyad-alsadi, can you elaborate on a use case? Podman supports OCI hooks which may meet your requirements already. |
See the old issue which has more context. OCI hooks are different than a generic cli plugin. Hooks can only be used for a container lifecycle. For a tool like compose you cannot use hooks, you want the user to type a specific command. I never understand why someone would need a plugin in the first place, what is the problem with typing |
yes, the old docker-compose was not a cli plugin, the new v2 is a cli plugin https://github.com/docker/scan-cli-plugin/
podman-compose and maybe scan ...etc.
exactly
so users can find help in one place
|
@containers/podman-maintainers PTAL |
The question for me is, will the Docker Compose v2.x tool remain a CLI plugin? If so, that's a pretty significant incentive for us to support the Docker plugin model, even if it is official deprecrated and mostly undocumented. With a few simple steps, a user can have Docker Compose, or Podman Compose, or both, directly integrated into the Podman CLI, and that's a very powerful argument. Unfortunately, I don't really have an answer here. The Docker folks say they're looking into integrating compose v2.0 more directly, which would presumably not involve CLI plugins, but we don't know if that is going to happen or when. |
If we could do this simply, IE if an executable is in a directory, then we can show it in the help, and execute the commands, then I am fine with it. If it involves huge engineering, then I agree it is not worth it. |
This is exactly this is what I want. Just execute the binary and display help. |
PRs welcome. :^) |
A friendly reminder that this issue had no activity for 30 days. |
/remove stale |
A friendly reminder that this issue had no activity for 30 days. |
/remove |
git it |
Before there is to much work done on this we should agree on a design first. cc @containers/podman-maintainers |
docker/cli#1534 should summarize the design quite well. Certainly, we need to support the Docker-specific paths and also look up plugins with |
Right, I want to keep this as simple as possible at least to start. Goal would be to make podman compose work with docker-compose as MVP. Getting podman FOOBAR to launch the FOOBAR executable and pass arguments to FOOBAR |
A friendly reminder that this issue had no activity for 30 days. |
@karthikelango137 Any progress or should I assign this to someone else? |
I plan to begin next week. Do you think 4-5 weeks is enough time for this? I want to do it, but don't want to hold the team back. |
Start it and then we can follow up. See if you can get small chunks in and we can have people help you out. |
A friendly reminder that this issue had no activity for 30 days. |
@karthikelango137 did you make any progress? |
No, I haven't started it. Is this the route we are taking to support third party commands? I'm not sure if we confirmed this or not. |
A friendly reminder that this issue had no activity for 30 days. |
@rhatdan would this be something good for me to do? or is it low priority |
Sure as long as you keep it simple. |
@baude You were talking to me about this, WDYT? |
I think we've discussed this idea in detail last year and concluded to not pursue it, so I am closing the issue as not planned. Please reopen or speak up if I am mistaken. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind feature
Description
as discussed here
it's good to have a
podman <COMMAND>
by running executable namedpodman-<COMMAND>
found in
/usr/libexec/podman/cli-plugins/
or~/.podman/cli-plugins
The text was updated successfully, but these errors were encountered: