Followup to #1564 (cli plugins)
Open
Nobody has claimed this yet.
area/plugins
kind/enhancement
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
From #1564 (comment):
- https://github.com/docker/cli/pull/1564#discussion_r251818285 handling of
docker someplugin --version. The--version/-vflag is handled by the plugin root-command, and therefore shows thedockerversion information (Docker version 19.03.0-dev, build c8f1f1ee). We should fix this to be handled by theplugin. - Related to the above; consider making
--version/-vpart of the pluging "API", so that a plugin can advertise its version (both when calling the plugin directly (docker-myplugin --version), and when calling through thedockercli (docker myplugin --version). Perhaps we should add a standard function and/or define a standard format (docker-myplugin version X, commit deadbeef (ACME, Inc.)) - https://github.com/docker/cli/pull/1564#discussion_r251819147 install location for plugins; choose between
~/.docker/pluginsor~/.docker/cli-plugins→ See issue #1677 for discussion. - https://github.com/docker/cli/pull/1564#discussion_r251816130 decide on the output format in
docker --help: make plugin-command stand out from built-in commands, or make them appear as regular commands with a non-obtrusive indicator (*) → See PR #1675. - https://github.com/docker/cli/pull/1564#discussion_r251814998 decide on the location to show version and vendor for plugins in in
docker info→ See PR #1689. - https://github.com/docker/cli/pull/1564#discussion_r251890532 small nit: use
displayutils.Ellipsis()instead of a custom implementation. Obsoleted by PR https://github.com/docker/cli/pull/1675. - https://github.com/docker/cli/pull/1564#discussion_r251822916 small nit: hardening
config.Path()to disallow directory traversal - https://github.com/docker/cli/pull/1564#discussion_r251825582 small nit: fix usage output of the sample plugin
Others:
- plugins shuld be able to indicate if they are "management" vs not commands in their metadata and be listed accordingly in e.g.
docker help→ See PR #1684. - plugins should have a field in
config.jsonfor their use, see Configuration in design → See PR #1652. - plugins should call back to main cli using
dial-stdioto connect to engine. From https://github.com/docker/cli/issues/1534#issuecomment-446206041 → See PR #1654 .
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the remaining unchecked items and the linked discussion from PR #1564, focusing on docker someplugin --version, docker-myplugin --version, and the sample plugin's usage output. Done means deciding and implementing the plugin version API and correcting the sample plugin output, while accounting for the related work already moved to issues and pull requests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100