summaryrefslogtreecommitdiff
path: root/devdocs/docker/engine%2Freference%2Fcommandline%2Fplugin_set%2Findex.html
blob: 0476182adb4281e5b03037bdc038e00983fc2b47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<h1>docker plugin set</h1>  <p><br></p> <p>Change settings for a plugin</p> <h2 id="usage">Usage</h2> <div class="highlight"><pre class="highlight" data-language="">$ docker plugin set PLUGIN KEY=VALUE [KEY=VALUE...]
</pre></div> <h2 id="description">Description</h2> <p name="extended-description">Change settings for a plugin. The plugin must be disabled.</p> <p>The settings currently supported are:</p> <ul> <li>env variables</li> <li>source of mounts</li> <li>path of devices</li> <li>args</li> </ul> <p>For example uses of this command, refer to the <a href="#examples">examples section</a> below.</p>  <h2 id="examples">Examples</h2> <h3 id="change-an-environment-variable">Change an environment variable</h3> <p>The following example change the env variable <code class="language-plaintext highlighter-rouge">DEBUG</code> on the <code class="language-plaintext highlighter-rouge">sample-volume-plugin</code> plugin.</p> <div class="highlight"><pre class="highlight" data-language="">$ 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]
</pre></div> <h3 id="change-the-source-of-a-mount">Change the source of a mount</h3> <p>The following example change the source of the <code class="language-plaintext highlighter-rouge">mymount</code> mount on the <code class="language-plaintext highlighter-rouge">myplugin</code> plugin.</p> <div class="highlight"><pre class="highlight" data-language="">$ 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
</pre></div> <blockquote> <p><strong>Note</strong></p> <p>Since only <code class="language-plaintext highlighter-rouge">source</code> is settable in <code class="language-plaintext highlighter-rouge">mymount</code>, <code class="language-plaintext highlighter-rouge">docker plugins set mymount=/bar myplugin</code> would work too.</p> </blockquote> <h3 id="change-a-device-path">Change a device path</h3> <p>The following example change the path of the <code class="language-plaintext highlighter-rouge">mydevice</code> device on the <code class="language-plaintext highlighter-rouge">myplugin</code> plugin.</p> <div class="highlight"><pre class="highlight" data-language="">$ 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
</pre></div> <blockquote> <p><strong>Note</strong> Since only <code class="language-plaintext highlighter-rouge">path</code> is settable in <code class="language-plaintext highlighter-rouge">mydevice</code>, <code class="language-plaintext highlighter-rouge">docker plugins set mydevice=/dev/bar myplugin</code> would work too.</p> </blockquote> <h3 id="change-the-source-of-the-arguments">Change the source of the arguments</h3> <p>The following example change the value of the args on the <code class="language-plaintext highlighter-rouge">myplugin</code> plugin.</p> <div class="highlight"><pre class="highlight" data-language="">$ 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"]
</pre></div> <h2 id="parent-command">Parent command</h2> <table> <thead> <tr> <th style="text-align: left">Command</th> <th style="text-align: left">Description</th> </tr> </thead> <tbody> <tr> <td style="text-align: left"><a href="../plugin/index">docker plugin</a></td> <td style="text-align: left">Manage plugins</td> </tr> </tbody> </table> <h2 id="related-commands">Related commands</h2> <table> <thead> <tr> <td>Command</td> <td>Description</td> </tr> </thead> <tbody> <tr> <td><a href="../plugin_create/index">docker plugin create</a></td> <td>Create a plugin from a rootfs and configuration. Plugin data directory must contain config.json and rootfs directory.</td> </tr> <tr> <td><a href="../plugin_disable/index">docker plugin disable</a></td> <td>Disable a plugin</td> </tr> <tr> <td><a href="../plugin_enable/index">docker plugin enable</a></td> <td>Enable a plugin</td> </tr> <tr> <td><a href="../plugin_inspect/index">docker plugin inspect</a></td> <td>Display detailed information on one or more plugins</td> </tr> <tr> <td><a href="../plugin_install/index">docker plugin install</a></td> <td>Install a plugin</td> </tr> <tr> <td><a href="../plugin_ls/index">docker plugin ls</a></td> <td>List plugins</td> </tr> <tr> <td><a href="../plugin_push/index">docker plugin push</a></td> <td>Push a plugin to a registry</td> </tr> <tr> <td><a href="../plugin_rm/index">docker plugin rm</a></td> <td>Remove one or more plugins</td> </tr> <tr> <td><a href="index">docker plugin set</a></td> <td>Change settings for a plugin</td> </tr> <tr> <td><a href="../plugin_upgrade/index">docker plugin upgrade</a></td> <td>Upgrade an existing plugin</td> </tr> </tbody> </table> <div class="_attribution">
  <p class="_attribution-p">
    &copy; 2019 Docker, Inc.<br>Licensed under the Apache License, Version 2.0.<br>Docker and the Docker logo are trademarks or registered trademarks of Docker, Inc. in the United States and/or other countries.<br>Docker, Inc. and other parties may also have trademark rights in other terms used herein.<br>
    <a href="https://docs.docker.com/engine/reference/commandline/plugin_set/" class="_attribution-link">https://docs.docker.com/engine/reference/commandline/plugin_set/</a>
  </p>
</div>