fix some typos for plugin

Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
This commit is contained in:
yuexiao-wang 2017-04-28 05:24:49 +08:00 committed by Tibor Vass
parent 7480fcad48
commit 079bc9c7aa
9 changed files with 23 additions and 5 deletions

View File

@ -175,7 +175,7 @@ read the [`dockerd`](dockerd.md) reference page.
|:--------|:-------------------------------------------------------------------| |:--------|:-------------------------------------------------------------------|
| [plugin create](plugin_create.md) | Create a plugin from a rootfs and configuration | | [plugin create](plugin_create.md) | Create a plugin from a rootfs and configuration |
| [plugin disable](plugin_disable.md) | Disable a plugin | | [plugin disable](plugin_disable.md) | Disable a plugin |
| [plugin enbale](plugin_enable.md) | Enable a plugin | | [plugin enable](plugin_enable.md) | Enable a plugin |
| [plugin inspect](plugin_inspect.md) | Display detailed information on a plugin | | [plugin inspect](plugin_inspect.md) | Display detailed information on a plugin |
| [plugin install](plugin_install.md) | Install a plugin | | [plugin install](plugin_install.md) | Install a plugin |
| [plugin ls](plugin_ls.md) | List plugins | | [plugin ls](plugin_ls.md) | List plugins |

View File

@ -37,6 +37,7 @@ The following example shows how to create a sample `plugin`.
```bash ```bash
$ ls -ls /home/pluginDir $ ls -ls /home/pluginDir
total 4
4 -rw-r--r-- 1 root root 431 Nov 7 01:40 config.json 4 -rw-r--r-- 1 root root 431 Nov 7 01:40 config.json
0 drwxr-xr-x 19 root root 420 Nov 7 01:40 rootfs 0 drwxr-xr-x 19 root root 420 Nov 7 01:40 rootfs

View File

@ -29,7 +29,7 @@ Options:
Disables a plugin. The plugin must be installed before it can be disabled, Disables a plugin. The plugin must be installed before it can be disabled,
see [`docker plugin install`](plugin_install.md). Without the `-f` option, see [`docker plugin install`](plugin_install.md). Without the `-f` option,
a plugin that has references (eg, volumes, networks) cannot be disabled. a plugin that has references (e.g., volumes, networks) cannot be disabled.
## Examples ## Examples

View File

@ -153,7 +153,6 @@ $ docker plugin inspect -f '{{.Id}}' tiborvass/sample-volume-plugin:latest
8c74c978c434745c3ade82f1bc0acf38d04990eaf494fa507c16d9f1daa99c21 8c74c978c434745c3ade82f1bc0acf38d04990eaf494fa507c16d9f1daa99c21
``` ```
## Related commands ## Related commands
* [plugin create](plugin_create.md) * [plugin create](plugin_create.md)

View File

@ -77,7 +77,6 @@ $ docker plugin ls --filter enabled=true
NAME TAG DESCRIPTION ENABLED NAME TAG DESCRIPTION ENABLED
``` ```
### Formatting ### Formatting
The formatting options (`--format`) pretty-prints plugins output The formatting options (`--format`) pretty-prints plugins output
@ -106,7 +105,6 @@ $ docker plugin ls --format "{{.ID}}: {{.Name}}"
4be01827a72e: tiborvass/no-remove 4be01827a72e: tiborvass/no-remove
``` ```
## Related commands ## Related commands
* [plugin create](plugin_create.md) * [plugin create](plugin_create.md)

View File

@ -40,6 +40,7 @@ $ docker plugin ls
ID NAME TAG DESCRIPTION ENABLED ID NAME TAG DESCRIPTION ENABLED
69553ca1d456 user/plugin latest A sample plugin for Docker false 69553ca1d456 user/plugin latest A sample plugin for Docker false
$ docker plugin push user/plugin $ docker plugin push user/plugin
``` ```

View File

@ -42,9 +42,11 @@ plugin:
```bash ```bash
$ docker plugin disable tiborvass/sample-volume-plugin $ docker plugin disable tiborvass/sample-volume-plugin
tiborvass/sample-volume-plugin tiborvass/sample-volume-plugin
$ docker plugin rm tiborvass/sample-volume-plugin:latest $ docker plugin rm tiborvass/sample-volume-plugin:latest
tiborvass/sample-volume-plugin tiborvass/sample-volume-plugin
``` ```

View File

@ -130,11 +130,13 @@ the `myplugin` plugin.
```bash ```bash
$ docker plugin inspect -f '{{with $device := index .Settings.Devices 0}}{{$device.Path}}{{end}}' myplugin $ docker plugin inspect -f '{{with $device := index .Settings.Devices 0}}{{$device.Path}}{{end}}' myplugin
/dev/foo /dev/foo
$ docker plugins set myplugin mydevice.path=/dev/bar $ docker plugins set myplugin mydevice.path=/dev/bar
$ docker plugin inspect -f '{{with $device := index .Settings.Devices 0}}{{$device.Path}}{{end}}' myplugin $ docker plugin inspect -f '{{with $device := index .Settings.Devices 0}}{{$device.Path}}{{end}}' myplugin
/dev/bar /dev/bar
``` ```
@ -147,11 +149,13 @@ The following example change the value of the args on the `myplugin` plugin.
```bash ```bash
$ docker plugin inspect -f '{{.Settings.Args}}' myplugin $ docker plugin inspect -f '{{.Settings.Args}}' myplugin
["foo", "bar"] ["foo", "bar"]
$ docker plugins set myplugin myargs="foo bar baz" $ docker plugins set myplugin myargs="foo bar baz"
$ docker plugin inspect -f '{{.Settings.Args}}' myplugin $ docker plugin inspect -f '{{.Settings.Args}}' myplugin
["foo", "bar", "baz"] ["foo", "bar", "baz"]
``` ```
@ -165,3 +169,4 @@ $ docker plugin inspect -f '{{.Settings.Args}}' myplugin
* [plugin ls](plugin_ls.md) * [plugin ls](plugin_ls.md)
* [plugin push](plugin_push.md) * [plugin push](plugin_push.md)
* [plugin rm](plugin_rm.md) * [plugin rm](plugin_rm.md)
* [plugin upgrade](plugin_upgrade.md)

View File

@ -50,28 +50,40 @@ Do you grant the above permissions? [y/N] y
vieux/sshfs:next vieux/sshfs:next
$ docker volume create -d vieux/sshfs:next -o sshcmd=root@1.2.3.4:/tmp/shared -o password=XXX sshvolume $ docker volume create -d vieux/sshfs:next -o sshcmd=root@1.2.3.4:/tmp/shared -o password=XXX sshvolume
sshvolume sshvolume
$ docker run -it -v sshvolume:/data alpine sh -c "touch /data/hello" $ docker run -it -v sshvolume:/data alpine sh -c "touch /data/hello"
$ docker plugin disable -f vieux/sshfs:next $ docker plugin disable -f vieux/sshfs:next
viex/sshfs:next viex/sshfs:next
# Here docker volume ls doesn't show 'sshfsvolume', since the plugin is disabled # Here docker volume ls doesn't show 'sshfsvolume', since the plugin is disabled
$ docker volume ls $ docker volume ls
DRIVER VOLUME NAME DRIVER VOLUME NAME
$ docker plugin upgrade vieux/sshfs:next vieux/sshfs:next $ docker plugin upgrade vieux/sshfs:next vieux/sshfs:next
Plugin "vieux/sshfs:next" is requesting the following privileges: Plugin "vieux/sshfs:next" is requesting the following privileges:
- network: [host] - network: [host]
- device: [/dev/fuse] - device: [/dev/fuse]
- capabilities: [CAP_SYS_ADMIN] - capabilities: [CAP_SYS_ADMIN]
Do you grant the above permissions? [y/N] y Do you grant the above permissions? [y/N] y
Upgrade plugin vieux/sshfs:next to vieux/sshfs:next Upgrade plugin vieux/sshfs:next to vieux/sshfs:next
$ docker plugin enable vieux/sshfs:next $ docker plugin enable vieux/sshfs:next
viex/sshfs:next viex/sshfs:next
$ docker volume ls $ docker volume ls
DRIVER VOLUME NAME DRIVER VOLUME NAME
viuex/sshfs:next sshvolume viuex/sshfs:next sshvolume
$ docker run -it -v sshvolume:/data alpine sh -c "ls /data" $ docker run -it -v sshvolume:/data alpine sh -c "ls /data"
hello hello
``` ```