This fix updates the Plugin API docs to cover the case of remote
plugins which could be deployed on a host different from the
docker host, through spec or json files.
This fix closes #20188.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
| ... | ... |
@@ -20,8 +20,9 @@ If you just want to learn about or use Docker plugins, look |
| 20 | 20 |
|
| 21 | 21 |
## What plugins are |
| 22 | 22 |
|
| 23 |
-A plugin is a process running on the same docker host as the docker daemon, |
|
| 24 |
-which registers itself by placing a file in one of the plugin directories described in [Plugin discovery](#plugin-discovery). |
|
| 23 |
+A plugin is a process running on the same or a different host as the docker daemon, |
|
| 24 |
+which registers itself by placing a file on the same docker host in one of the plugin |
|
| 25 |
+directories described in [Plugin discovery](#plugin-discovery). |
|
| 25 | 26 |
|
| 26 | 27 |
Plugins have human-readable names, which are short, lowercase strings. For |
| 27 | 28 |
example, `flocker` or `weave`. |
| ... | ... |
@@ -37,9 +38,12 @@ user or container tries to use one by name. |
| 37 | 37 |
There are three types of files which can be put in the plugin directory. |
| 38 | 38 |
|
| 39 | 39 |
* `.sock` files are UNIX domain sockets. |
| 40 |
-* `.spec` files are text files containing a URL, such as `unix:///other.sock`. |
|
| 40 |
+* `.spec` files are text files containing a URL, such as `unix:///other.sock` or `tcp://localhost:8080`. |
|
| 41 | 41 |
* `.json` files are text files containing a full json specification for the plugin. |
| 42 | 42 |
|
| 43 |
+Plugins with UNIX domain socket files must run on the same docker host, whereas |
|
| 44 |
+plugins with spec or json files can run on a different host if a remote URL is specified. |
|
| 45 |
+ |
|
| 43 | 46 |
UNIX domain socket files must be located under `/run/docker/plugins`, whereas |
| 44 | 47 |
spec files can be located either under `/etc/docker/plugins` or `/usr/lib/docker/plugins`. |
| 45 | 48 |
|