mirror of https://github.com/docker/cli.git
				
				
				
			fix some typos for plugin
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
This commit is contained in:
		
							parent
							
								
									7480fcad48
								
							
						
					
					
						commit
						079bc9c7aa
					
				| 
						 | 
				
			
			@ -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 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 install](plugin_install.md) | Install a plugin                       |
 | 
			
		||||
| [plugin ls](plugin_ls.md) | List plugins                                     |
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,6 +37,7 @@ The following example shows how to create a sample `plugin`.
 | 
			
		|||
```bash
 | 
			
		||||
$ ls -ls /home/pluginDir
 | 
			
		||||
 | 
			
		||||
total 4
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -29,7 +29,7 @@ Options:
 | 
			
		|||
 | 
			
		||||
Disables a plugin. The plugin must be installed before it can be disabled,
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -153,7 +153,6 @@ $ docker plugin inspect -f '{{.Id}}' tiborvass/sample-volume-plugin:latest
 | 
			
		|||
8c74c978c434745c3ade82f1bc0acf38d04990eaf494fa507c16d9f1daa99c21
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## Related commands
 | 
			
		||||
 | 
			
		||||
* [plugin create](plugin_create.md)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -77,7 +77,6 @@ $ docker plugin ls --filter enabled=true
 | 
			
		|||
NAME                  TAG                 DESCRIPTION                ENABLED
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### Formatting
 | 
			
		||||
 | 
			
		||||
The formatting options (`--format`) pretty-prints plugins output
 | 
			
		||||
| 
						 | 
				
			
			@ -106,7 +105,6 @@ $ docker plugin ls --format "{{.ID}}: {{.Name}}"
 | 
			
		|||
4be01827a72e: tiborvass/no-remove
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## Related commands
 | 
			
		||||
 | 
			
		||||
* [plugin create](plugin_create.md)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -40,6 +40,7 @@ $ docker plugin ls
 | 
			
		|||
 | 
			
		||||
ID                  NAME                  TAG                 DESCRIPTION                ENABLED
 | 
			
		||||
69553ca1d456        user/plugin           latest              A sample plugin for Docker false
 | 
			
		||||
 | 
			
		||||
$ docker plugin push user/plugin
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,9 +42,11 @@ plugin:
 | 
			
		|||
 | 
			
		||||
```bash
 | 
			
		||||
$ docker plugin disable tiborvass/sample-volume-plugin
 | 
			
		||||
 | 
			
		||||
tiborvass/sample-volume-plugin
 | 
			
		||||
 | 
			
		||||
$ docker plugin rm tiborvass/sample-volume-plugin:latest
 | 
			
		||||
 | 
			
		||||
tiborvass/sample-volume-plugin
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -130,11 +130,13 @@ the `myplugin` plugin.
 | 
			
		|||
 | 
			
		||||
```bash
 | 
			
		||||
$ docker plugin inspect -f '{{with $device := index .Settings.Devices 0}}{{$device.Path}}{{end}}' myplugin
 | 
			
		||||
 | 
			
		||||
/dev/foo
 | 
			
		||||
 | 
			
		||||
$ docker plugins set myplugin mydevice.path=/dev/bar
 | 
			
		||||
 | 
			
		||||
$ docker plugin inspect -f '{{with $device := index .Settings.Devices 0}}{{$device.Path}}{{end}}' myplugin
 | 
			
		||||
 | 
			
		||||
/dev/bar
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -147,11 +149,13 @@ The following example change the value of the args on the `myplugin` plugin.
 | 
			
		|||
 | 
			
		||||
```bash
 | 
			
		||||
$ docker plugin inspect -f '{{.Settings.Args}}' myplugin
 | 
			
		||||
 | 
			
		||||
["foo", "bar"]
 | 
			
		||||
 | 
			
		||||
$ docker plugins set myplugin myargs="foo bar baz"
 | 
			
		||||
 | 
			
		||||
$ docker plugin inspect -f '{{.Settings.Args}}' myplugin
 | 
			
		||||
 | 
			
		||||
["foo", "bar", "baz"]
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -165,3 +169,4 @@ $ docker plugin inspect -f '{{.Settings.Args}}' myplugin
 | 
			
		|||
* [plugin ls](plugin_ls.md)
 | 
			
		||||
* [plugin push](plugin_push.md)
 | 
			
		||||
* [plugin rm](plugin_rm.md)
 | 
			
		||||
* [plugin upgrade](plugin_upgrade.md)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -50,28 +50,40 @@ Do you grant the above permissions? [y/N] y
 | 
			
		|||
vieux/sshfs:next
 | 
			
		||||
 | 
			
		||||
$ docker volume create -d vieux/sshfs:next -o sshcmd=root@1.2.3.4:/tmp/shared -o password=XXX sshvolume
 | 
			
		||||
 | 
			
		||||
sshvolume
 | 
			
		||||
 | 
			
		||||
$ docker run -it -v sshvolume:/data alpine sh -c "touch /data/hello"
 | 
			
		||||
 | 
			
		||||
$ docker plugin disable -f vieux/sshfs:next
 | 
			
		||||
 | 
			
		||||
viex/sshfs:next
 | 
			
		||||
 | 
			
		||||
# Here docker volume ls doesn't show 'sshfsvolume', since the plugin is disabled
 | 
			
		||||
$ docker volume ls
 | 
			
		||||
 | 
			
		||||
DRIVER              VOLUME NAME
 | 
			
		||||
 | 
			
		||||
$ docker plugin upgrade vieux/sshfs:next vieux/sshfs:next
 | 
			
		||||
 | 
			
		||||
Plugin "vieux/sshfs:next" is requesting the following privileges:
 | 
			
		||||
 - network: [host]
 | 
			
		||||
 - device: [/dev/fuse]
 | 
			
		||||
 - capabilities: [CAP_SYS_ADMIN]
 | 
			
		||||
Do you grant the above permissions? [y/N] y
 | 
			
		||||
Upgrade plugin vieux/sshfs:next to vieux/sshfs:next
 | 
			
		||||
 | 
			
		||||
$ docker plugin enable vieux/sshfs:next
 | 
			
		||||
 | 
			
		||||
viex/sshfs:next
 | 
			
		||||
 | 
			
		||||
$ docker volume ls
 | 
			
		||||
 | 
			
		||||
DRIVER              VOLUME NAME
 | 
			
		||||
viuex/sshfs:next    sshvolume
 | 
			
		||||
 | 
			
		||||
$ docker run -it -v sshvolume:/data alpine sh -c "ls /data"
 | 
			
		||||
 | 
			
		||||
hello
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue