blob: 91ef2e04441cdef3913f02e05720b1fecc4aa6f5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<h1>docker trust key generate</h1> <p><br></p> <p>Generate and load a signing key-pair</p> <h2 id="usage">Usage</h2> <div class="highlight"><pre class="highlight" data-language="">$ docker trust key generate NAME
</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"><code class="language-plaintext highlighter-rouge">docker trust key generate</code> generates a key-pair to be used with signing, and loads the private key into the local docker trust keystore.</p> <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">--dir</code></td> <td></td> <td>Directory to generate key in, defaults to current directory</td> </tr> </tbody> </table> <h2 id="examples">Examples</h2> <h3 id="generate-a-key-pair">Generate a key-pair</h3> <div class="highlight"><pre class="highlight" data-language="">$ docker trust key generate alice
Generating key for alice...
Enter passphrase for new alice key with ID 17acf3c:
Repeat passphrase for new alice key with ID 17acf3c:
Successfully generated and loaded private key. Corresponding public key available: alice.pub
$ ls
alice.pub
</pre></div> <p>The private signing key is encrypted by the passphrase and loaded into the docker trust keystore. All passphrase requests to sign with the key will be referred to by the provided <code class="language-plaintext highlighter-rouge">NAME</code>.</p> <p>The public key component <code class="language-plaintext highlighter-rouge">alice.pub</code> will be available in the current working directory, and can be used directly by <code class="language-plaintext highlighter-rouge">docker trust signer add</code>.</p> <p>Provide the <code class="language-plaintext highlighter-rouge">--dir</code> argument to specify a directory to generate the key in:</p> <div class="highlight"><pre class="highlight" data-language="">$ docker trust key generate alice --dir /foo
Generating key for alice...
Enter passphrase for new alice key with ID 17acf3c:
Repeat passphrase for new alice key with ID 17acf3c:
Successfully generated and loaded private key. Corresponding public key available: alice.pub
$ ls /foo
alice.pub
</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="../trust_key/index">docker trust key</a></td> <td style="text-align: left">Manage keys for signing Docker images</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 trust key generate</a></td> <td>Generate and load a signing key-pair</td> </tr> <tr> <td><a href="../trust_key_load/index">docker trust key load</a></td> <td>Load a private key file for signing</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/trust_key_generate/" class="_attribution-link">https://docs.docker.com/engine/reference/commandline/trust_key_generate/</a>
</p>
</div>
|