diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
| commit | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch) | |
| tree | f1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/docker/engine%2Freference%2Fcommandline%2Fconfig_create%2Findex.html | |
new repository
Diffstat (limited to 'devdocs/docker/engine%2Freference%2Fcommandline%2Fconfig_create%2Findex.html')
| -rw-r--r-- | devdocs/docker/engine%2Freference%2Fcommandline%2Fconfig_create%2Findex.html | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/devdocs/docker/engine%2Freference%2Fcommandline%2Fconfig_create%2Findex.html b/devdocs/docker/engine%2Freference%2Fcommandline%2Fconfig_create%2Findex.html new file mode 100644 index 00000000..8ba5438f --- /dev/null +++ b/devdocs/docker/engine%2Freference%2Fcommandline%2Fconfig_create%2Findex.html @@ -0,0 +1,51 @@ +<h1>docker config create</h1> <p><br></p> <p>Create a config from a file or STDIN</p> <p><span class="badge badge-info" data-toggle="tooltip" data-placement="right" title="This command works with the Swarm orchestrator.">Swarm</span> This command works with the Swarm orchestrator.</p> <h2 id="usage">Usage</h2> <div class="highlight"><pre class="highlight" data-language="">$ docker config create [OPTIONS] CONFIG file|- +</pre></div> <p>Refer to the <a href="#options">options section</a> for an overview of available <a href="#options"><code class="language-plaintext highlighter-rouge">OPTIONS</code></a> for this command.</p> <h2 id="description">Description</h2> <p name="extended-description">Creates a config using standard input or from a file for the config content.</p> <p>For detailed information about using configs, refer to <a href="../../../swarm/configs/index">store configuration data using Docker Configs</a>.</p> <blockquote> <p><strong>Note</strong></p> <p>This is a cluster management command, and must be executed on a swarm manager node. To learn about managers and workers, refer to the <a href="../../../swarm/index">Swarm mode section</a> in the documentation.</p> </blockquote> <p>For example uses of this command, refer to the <a href="#examples">examples section</a> below.</p> <h2 id="options">Options</h2> <table> <thead> <tr> <td>Name, shorthand</td> <td>Default</td> <td>Description</td> </tr> </thead> <tbody> <tr> <td> +<code class="language-plaintext highlighter-rouge">--label</code> , <code class="language-plaintext highlighter-rouge">-l</code> +</td> <td></td> <td>Config labels</td> </tr> <tr> <td><code class="language-plaintext highlighter-rouge">--template-driver</code></td> <td></td> <td>Template driver</td> </tr> </tbody> </table> <h2 id="examples">Examples</h2> <h3 id="create-a-config">Create a config</h3> <div class="highlight"><pre class="highlight" data-language="">$ printf <config> | docker config create my_config - + +onakdyv307se2tl7nl20anokv + +$ docker config ls + +ID NAME CREATED UPDATED +onakdyv307se2tl7nl20anokv my_config 6 seconds ago 6 seconds ago +</pre></div> <h3 id="create-a-config-with-a-file">Create a config with a file</h3> <div class="highlight"><pre class="highlight" data-language="">$ docker config create my_config ./config.json + +dg426haahpi5ezmkkj5kyl3sn + +$ docker config ls + +ID NAME CREATED UPDATED +dg426haahpi5ezmkkj5kyl3sn my_config 7 seconds ago 7 seconds ago +</pre></div> <h3 id="create-a-config-with-labels">Create a config with labels</h3> <div class="highlight"><pre class="highlight" data-language="">$ docker config create \ + --label env=dev \ + --label rev=20170324 \ + my_config ./config.json + +eo7jnzguqgtpdah3cm5srfb97 +</pre></div> <div class="highlight"><pre class="highlight" data-language="">$ docker config inspect my_config + +[ + { + "ID": "eo7jnzguqgtpdah3cm5srfb97", + "Version": { + "Index": 17 + }, + "CreatedAt": "2017-03-24T08:15:09.735271783Z", + "UpdatedAt": "2017-03-24T08:15:09.735271783Z", + "Spec": { + "Name": "my_config", + "Labels": { + "env": "dev", + "rev": "20170324" + }, + "Data": "aGVsbG8K" + } + } +] +</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="../config/index">docker config</a></td> <td style="text-align: left">Manage Docker configs</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="index">docker config create</a></td> <td>Create a config from a file or STDIN</td> </tr> <tr> <td><a href="../config_inspect/index">docker config inspect</a></td> <td>Display detailed information on one or more configs</td> </tr> <tr> <td><a href="../config_ls/index">docker config ls</a></td> <td>List configs</td> </tr> <tr> <td><a href="../config_rm/index">docker config rm</a></td> <td>Remove one or more configs</td> </tr> </tbody> </table> <div class="_attribution"> + <p class="_attribution-p"> + © 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/config_create/" class="_attribution-link">https://docs.docker.com/engine/reference/commandline/config_create/</a> + </p> +</div> |
