-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Description
From #1564 (comment):
- Basic framework for writing and running CLI plugins #1564 (comment) 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.)) - Basic framework for writing and running CLI plugins #1564 (comment) install location for plugins; choose between
~/.docker/pluginsor~/.docker/cli-plugins→ See issue Should cli plugins install to ~/.docker/plugins #1677 for discussion. - Basic framework for writing and running CLI plugins #1564 (comment) 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 Reformat plugin's vendor position and add version on --help #1675. - Basic framework for writing and running CLI plugins #1564 (comment) decide on the location to show version and vendor for plugins in in
docker info→ See PR Reformat the output of CLI plugins indocker system info#1689. - Basic framework for writing and running CLI plugins #1564 (comment) small nit: use
displayutils.Ellipsis()instead of a custom implementation. Obsoleted by PR Reformat plugin's vendor position and add version on --help #1675. - Basic framework for writing and running CLI plugins #1564 (comment) small nit: hardening
config.Path()to disallow directory traversal - Basic framework for writing and running CLI plugins #1564 (comment) 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 Show plugins as Management commands #1684. - plugins should have a field in
config.jsonfor their use, see Configuration in design → See PR Add a field to the config file for plugin use. #1652. - plugins should call back to main cli using
dial-stdioto connect to engine. From CLI Plugins Design #1534 (comment) → See PR cli-plugins: use system dial-stdio to contact the engine. #1654 .