github.com/sld880311/docker@v0.0.0-20200524143708-d5593973a475/docs/reference/commandline/plugin_set.md (about) 1 --- 2 title: "plugin set" 3 description: "the plugin set command description and usage" 4 keywords: "plugin, set" 5 --- 6 7 <!-- This file is maintained within the docker/docker Github 8 repository at https://github.com/docker/docker/. Make all 9 pull requests against that repo. If you see this file in 10 another repository, consider it read-only there, as it will 11 periodically be overwritten by the definitive file. Pull 12 requests which include edits to this file in other repositories 13 will be rejected. 14 --> 15 16 # plugin set 17 18 ```markdown 19 Usage: docker plugin set PLUGIN KEY=VALUE [KEY=VALUE...] 20 21 Change settings for a plugin 22 23 Options: 24 --help Print usage 25 ``` 26 27 ## Description 28 29 Change settings for a plugin. The plugin must be disabled. 30 31 The settings currently supported are: 32 * env variables 33 * source of mounts 34 * path of devices 35 * args 36 37 ## Examples 38 39 ### Change an environment variable 40 41 The following example change the env variable `DEBUG` on the 42 `sample-volume-plugin` plugin. 43 44 ```bash 45 $ docker plugin inspect -f {{.Settings.Env}} tiborvass/sample-volume-plugin 46 47 [DEBUG=0] 48 49 $ docker plugin set tiborvass/sample-volume-plugin DEBUG=1 50 51 $ docker plugin inspect -f {{.Settings.Env}} tiborvass/sample-volume-plugin 52 [DEBUG=1] 53 ``` 54 55 ### Change the source of a mount 56 57 The following example change the source of the `mymount` mount on 58 the `myplugin` plugin. 59 60 ```bash 61 $ docker plugin inspect -f '{{with $mount := index .Settings.Mounts 0}}{{$mount.Source}}{{end}}' myplugin 62 /foo 63 64 $ docker plugins set myplugin mymount.source=/bar 65 66 $ docker plugin inspect -f '{{with $mount := index .Settings.Mounts 0}}{{$mount.Source}}{{end}}' myplugin 67 /bar 68 ``` 69 70 > **Note**: Since only `source` is settable in `mymount`, 71 > `docker plugins set mymount=/bar myplugin` would work too. 72 73 ### Change a device path 74 75 The following example change the path of the `mydevice` device on 76 the `myplugin` plugin. 77 78 ```bash 79 $ docker plugin inspect -f '{{with $device := index .Settings.Devices 0}}{{$device.Path}}{{end}}' myplugin 80 /dev/foo 81 82 $ docker plugins set myplugin mydevice.path=/dev/bar 83 84 $ docker plugin inspect -f '{{with $device := index .Settings.Devices 0}}{{$device.Path}}{{end}}' myplugin 85 /dev/bar 86 ``` 87 88 > **Note**: Since only `path` is settable in `mydevice`, 89 > `docker plugins set mydevice=/dev/bar myplugin` would work too. 90 91 ### Change the source of the arguments 92 93 The following example change the source of the args on the `myplugin` plugin. 94 95 ```bash 96 $ docker plugin inspect -f '{{.Settings.Args}}' myplugin 97 ["foo", "bar"] 98 99 $ docker plugins set myplugin args="foo bar baz" 100 101 $ docker plugin inspect -f '{{.Settings.Args}}' myplugin 102 ["foo", "bar", "baz"] 103 ``` 104 105 ## Related commands 106 107 * [plugin create](plugin_create.md) 108 * [plugin disable](plugin_disable.md) 109 * [plugin enable](plugin_enable.md) 110 * [plugin inspect](plugin_inspect.md) 111 * [plugin install](plugin_install.md) 112 * [plugin ls](plugin_ls.md) 113 * [plugin push](plugin_push.md) 114 * [plugin rm](plugin_rm.md)