diff options
Diffstat (limited to 'devdocs/docker/engine%2Freference%2Fcommandline%2Fsecret_inspect%2Findex.html')
| -rw-r--r-- | devdocs/docker/engine%2Freference%2Fcommandline%2Fsecret_inspect%2Findex.html | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/devdocs/docker/engine%2Freference%2Fcommandline%2Fsecret_inspect%2Findex.html b/devdocs/docker/engine%2Freference%2Fcommandline%2Fsecret_inspect%2Findex.html new file mode 100644 index 00000000..d4e02194 --- /dev/null +++ b/devdocs/docker/engine%2Freference%2Fcommandline%2Fsecret_inspect%2Findex.html @@ -0,0 +1,34 @@ +<h1>docker secret inspect</h1> <p><br></p> <p>Display detailed information on one or more secrets</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 secret inspect [OPTIONS] SECRET [SECRET...] +</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">Inspects the specified secret.</p> <p>By default, this renders all results in a JSON array. If a format is specified, the given template will be executed for each result.</p> <p>Go’s <a href="https://golang.org/pkg/text/template/">text/template</a> package describes all the details of the format.</p> <p>For detailed information about using secrets, refer to <a href="../../../swarm/secrets/index">manage sensitive data with Docker secrets</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">--format</code> , <code class="language-plaintext highlighter-rouge">-f</code> +</td> <td></td> <td>Format the output using the given Go template</td> </tr> <tr> <td><code class="language-plaintext highlighter-rouge">--pretty</code></td> <td></td> <td>Print the information in a human friendly format</td> </tr> </tbody> </table> <h2 id="examples">Examples</h2> <h3 id="inspect-a-secret-by-name-or-id">Inspect a secret by name or ID</h3> <p>You can inspect a secret, either by its <em>name</em>, or <em>ID</em></p> <p>For example, given the following secret:</p> <div class="highlight"><pre class="highlight" data-language="">$ docker secret ls + +ID NAME CREATED UPDATED +eo7jnzguqgtpdah3cm5srfb97 my_secret 3 minutes ago 3 minutes ago +</pre></div> <div class="highlight"><pre class="highlight" data-language="">$ docker secret inspect secret.json +</pre></div> <p>The output is in JSON format, for example:</p> <div class="highlight"><pre class="highlight" data-language="">[ + { + "ID": "eo7jnzguqgtpdah3cm5srfb97", + "Version": { + "Index": 17 + }, + "CreatedAt": "2017-03-24T08:15:09.735271783Z", + "UpdatedAt": "2017-03-24T08:15:09.735271783Z", + "Spec": { + "Name": "my_secret", + "Labels": { + "env": "dev", + "rev": "20170324" + } + } + } +] +</pre></div> <h3 id="formatting">Formatting</h3> <p>You can use the --format option to obtain specific information about a secret. The following example command outputs the creation time of the secret.</p> <div class="highlight"><pre class="highlight" data-language="">$ docker secret inspect --format='{{.CreatedAt}}' eo7jnzguqgtpdah3cm5srfb97 + +2017-03-24 08:15:09.735271783 +0000 UTC +</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="../secret/index">docker secret</a></td> <td style="text-align: left">Manage Docker secrets</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="../secret_create/index">docker secret create</a></td> <td>Create a secret from a file or STDIN as content</td> </tr> <tr> <td><a href="index">docker secret inspect</a></td> <td>Display detailed information on one or more secrets</td> </tr> <tr> <td><a href="../secret_ls/index">docker secret ls</a></td> <td>List secrets</td> </tr> <tr> <td><a href="../secret_rm/index">docker secret rm</a></td> <td>Remove one or more secrets</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/secret_inspect/" class="_attribution-link">https://docs.docker.com/engine/reference/commandline/secret_inspect/</a> + </p> +</div> |
