Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
| ... | ... |
@@ -175,7 +175,7 @@ read the [`dockerd`](dockerd.md) reference page. |
| 175 | 175 |
|:--------|:-------------------------------------------------------------------| |
| 176 | 176 |
| [plugin create](plugin_create.md) | Create a plugin from a rootfs and configuration | |
| 177 | 177 |
| [plugin disable](plugin_disable.md) | Disable a plugin | |
| 178 |
-| [plugin enbale](plugin_enable.md) | Enable a plugin | |
|
| 178 |
+| [plugin enable](plugin_enable.md) | Enable a plugin | |
|
| 179 | 179 |
| [plugin inspect](plugin_inspect.md) | Display detailed information on a plugin | |
| 180 | 180 |
| [plugin install](plugin_install.md) | Install a plugin | |
| 181 | 181 |
| [plugin ls](plugin_ls.md) | List plugins | |
| ... | ... |
@@ -29,7 +29,7 @@ Options: |
| 29 | 29 |
|
| 30 | 30 |
Disables a plugin. The plugin must be installed before it can be disabled, |
| 31 | 31 |
see [`docker plugin install`](plugin_install.md). Without the `-f` option, |
| 32 |
-a plugin that has references (eg, volumes, networks) cannot be disabled. |
|
| 32 |
+a plugin that has references (e.g., volumes, networks) cannot be disabled. |
|
| 33 | 33 |
|
| 34 | 34 |
## Examples |
| 35 | 35 |
|
| ... | ... |
@@ -77,7 +77,6 @@ $ docker plugin ls --filter enabled=true |
| 77 | 77 |
NAME TAG DESCRIPTION ENABLED |
| 78 | 78 |
``` |
| 79 | 79 |
|
| 80 |
- |
|
| 81 | 80 |
### Formatting |
| 82 | 81 |
|
| 83 | 82 |
The formatting options (`--format`) pretty-prints plugins output |
| ... | ... |
@@ -106,7 +105,6 @@ $ docker plugin ls --format "{{.ID}}: {{.Name}}"
|
| 106 | 106 |
4be01827a72e: tiborvass/no-remove |
| 107 | 107 |
``` |
| 108 | 108 |
|
| 109 |
- |
|
| 110 | 109 |
## Related commands |
| 111 | 110 |
|
| 112 | 111 |
* [plugin create](plugin_create.md) |
| ... | ... |
@@ -130,11 +130,13 @@ the `myplugin` plugin. |
| 130 | 130 |
|
| 131 | 131 |
```bash |
| 132 | 132 |
$ docker plugin inspect -f '{{with $device := index .Settings.Devices 0}}{{$device.Path}}{{end}}' myplugin
|
| 133 |
+ |
|
| 133 | 134 |
/dev/foo |
| 134 | 135 |
|
| 135 | 136 |
$ docker plugins set myplugin mydevice.path=/dev/bar |
| 136 | 137 |
|
| 137 | 138 |
$ docker plugin inspect -f '{{with $device := index .Settings.Devices 0}}{{$device.Path}}{{end}}' myplugin
|
| 139 |
+ |
|
| 138 | 140 |
/dev/bar |
| 139 | 141 |
``` |
| 140 | 142 |
|
| ... | ... |
@@ -147,11 +149,13 @@ The following example change the value of the args on the `myplugin` plugin. |
| 147 | 147 |
|
| 148 | 148 |
```bash |
| 149 | 149 |
$ docker plugin inspect -f '{{.Settings.Args}}' myplugin
|
| 150 |
+ |
|
| 150 | 151 |
["foo", "bar"] |
| 151 | 152 |
|
| 152 | 153 |
$ docker plugins set myplugin myargs="foo bar baz" |
| 153 | 154 |
|
| 154 | 155 |
$ docker plugin inspect -f '{{.Settings.Args}}' myplugin
|
| 156 |
+ |
|
| 155 | 157 |
["foo", "bar", "baz"] |
| 156 | 158 |
``` |
| 157 | 159 |
|
| ... | ... |
@@ -165,3 +169,4 @@ $ docker plugin inspect -f '{{.Settings.Args}}' myplugin
|
| 165 | 165 |
* [plugin ls](plugin_ls.md) |
| 166 | 166 |
* [plugin push](plugin_push.md) |
| 167 | 167 |
* [plugin rm](plugin_rm.md) |
| 168 |
+* [plugin upgrade](plugin_upgrade.md) |
| ... | ... |
@@ -50,28 +50,40 @@ Do you grant the above permissions? [y/N] y |
| 50 | 50 |
vieux/sshfs:next |
| 51 | 51 |
|
| 52 | 52 |
$ docker volume create -d vieux/sshfs:next -o sshcmd=root@1.2.3.4:/tmp/shared -o password=XXX sshvolume |
| 53 |
+ |
|
| 53 | 54 |
sshvolume |
| 55 |
+ |
|
| 54 | 56 |
$ docker run -it -v sshvolume:/data alpine sh -c "touch /data/hello" |
| 57 |
+ |
|
| 55 | 58 |
$ docker plugin disable -f vieux/sshfs:next |
| 59 |
+ |
|
| 56 | 60 |
viex/sshfs:next |
| 57 | 61 |
|
| 58 | 62 |
# Here docker volume ls doesn't show 'sshfsvolume', since the plugin is disabled |
| 59 | 63 |
$ docker volume ls |
| 64 |
+ |
|
| 60 | 65 |
DRIVER VOLUME NAME |
| 61 | 66 |
|
| 62 | 67 |
$ docker plugin upgrade vieux/sshfs:next vieux/sshfs:next |
| 68 |
+ |
|
| 63 | 69 |
Plugin "vieux/sshfs:next" is requesting the following privileges: |
| 64 | 70 |
- network: [host] |
| 65 | 71 |
- device: [/dev/fuse] |
| 66 | 72 |
- capabilities: [CAP_SYS_ADMIN] |
| 67 | 73 |
Do you grant the above permissions? [y/N] y |
| 68 | 74 |
Upgrade plugin vieux/sshfs:next to vieux/sshfs:next |
| 75 |
+ |
|
| 69 | 76 |
$ docker plugin enable vieux/sshfs:next |
| 77 |
+ |
|
| 70 | 78 |
viex/sshfs:next |
| 79 |
+ |
|
| 71 | 80 |
$ docker volume ls |
| 81 |
+ |
|
| 72 | 82 |
DRIVER VOLUME NAME |
| 73 | 83 |
viuex/sshfs:next sshvolume |
| 84 |
+ |
|
| 74 | 85 |
$ docker run -it -v sshvolume:/data alpine sh -c "ls /data" |
| 86 |
+ |
|
| 75 | 87 |
hello |
| 76 | 88 |
``` |
| 77 | 89 |
|