1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/docs/reference/commandline/plugin_set.md
Misty Stanley-Jones 52df69f00d Standardized formatting of CLI reference commands
Command name should be a H1

Only Description, Examples, and Related Commands should be H2

Changed 'Related information' heading to 'Related commands' since 99% it is only linking commands

Added some examples where relevant

Signed-off-by: Misty Stanley-Jones <misty@docker.com>
2017-02-08 16:57:58 -08:00

3 KiB

title description keywords
plugin set the plugin set command description and usage plugin, set

plugin set

Usage:  docker plugin set PLUGIN KEY=VALUE [KEY=VALUE...]

Change settings for a plugin

Options:
      --help                    Print usage

Description

Change settings for a plugin. The plugin must be disabled.

The settings currently supported are:

  • env variables
  • source of mounts
  • path of devices
  • args

Examples

Change an environment variable

The following example change the env variable DEBUG on the sample-volume-plugin plugin.

{% raw %}
$ docker plugin inspect -f {{.Settings.Env}} tiborvass/sample-volume-plugin

[DEBUG=0]

$ docker plugin set tiborvass/sample-volume-plugin DEBUG=1

$ docker plugin inspect -f {{.Settings.Env}} tiborvass/sample-volume-plugin
[DEBUG=1]
{% endraw %}

Change the source of a mount

The following example change the source of the mymount mount on the myplugin plugin.

{% raw %}
$ docker plugin inspect -f '{{with $mount := index .Settings.Mounts 0}}{{$mount.Source}}{{end}}' myplugin
/foo

$ docker plugins set myplugin mymount.source=/bar

$ docker plugin inspect -f '{{with $mount := index .Settings.Mounts 0}}{{$mount.Source}}{{end}}' myplugin
/bar
{% endraw %}

Note

: Since only source is settable in mymount, docker plugins set mymount=/bar myplugin would work too.

Change a device path

The following example change the path of the mydevice device on the myplugin plugin.

{% raw %}
$ 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
{% endraw %}

Note

: Since only path is settable in mydevice, docker plugins set mydevice=/dev/bar myplugin would work too.

Change the source of the arguments

The following example change the source of the args on the myplugin plugin.

{% raw %}
$ docker plugin inspect -f '{{.Settings.Args}}' myplugin
["foo", "bar"]

$ docker plugins set myplugin args="foo bar baz"

$ docker plugin inspect -f '{{.Settings.Args}}' myplugin
["foo", "bar", "baz"]
{% endraw %}