summaryrefslogtreecommitdiff
path: root/devdocs/docker/engine%2Freference%2Fcommandline%2Fcli%2Findex.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/docker/engine%2Freference%2Fcommandline%2Fcli%2Findex.html
new repository
Diffstat (limited to 'devdocs/docker/engine%2Freference%2Fcommandline%2Fcli%2Findex.html')
-rw-r--r--devdocs/docker/engine%2Freference%2Fcommandline%2Fcli%2Findex.html104
1 files changed, 104 insertions, 0 deletions
diff --git a/devdocs/docker/engine%2Freference%2Fcommandline%2Fcli%2Findex.html b/devdocs/docker/engine%2Freference%2Fcommandline%2Fcli%2Findex.html
new file mode 100644
index 00000000..c7e152f7
--- /dev/null
+++ b/devdocs/docker/engine%2Freference%2Fcommandline%2Fcli%2Findex.html
@@ -0,0 +1,104 @@
+<h1>Use the Docker command line</h1> <h2 id="docker">docker</h2> <p>To list available commands, either run <code class="language-plaintext highlighter-rouge">docker</code> with no parameters or execute <code class="language-plaintext highlighter-rouge">docker help</code>:</p> <div class="highlight"><pre class="highlight" data-language="">$ docker
+Usage: docker [OPTIONS] COMMAND [ARG...]
+ docker [ --help | -v | --version ]
+
+A self-sufficient runtime for containers.
+
+Options:
+ --config string Location of client config files (default "/root/.docker")
+ -c, --context string Name of the context to use to connect to the daemon (overrides DOCKER_HOST env var and default context set with "docker context use")
+ -D, --debug Enable debug mode
+ --help Print usage
+ -H, --host value Daemon socket(s) to connect to (default [])
+ -l, --log-level string Set the logging level ("debug"|"info"|"warn"|"error"|"fatal") (default "info")
+ --tls Use TLS; implied by --tlsverify
+ --tlscacert string Trust certs signed only by this CA (default "/root/.docker/ca.pem")
+ --tlscert string Path to TLS certificate file (default "/root/.docker/cert.pem")
+ --tlskey string Path to TLS key file (default "/root/.docker/key.pem")
+ --tlsverify Use TLS and verify the remote
+ -v, --version Print version information and quit
+
+Commands:
+ attach Attach to a running container
+ # […]
+</pre></div> <h2 id="description">Description</h2> <p>Depending on your Docker system configuration, you may be required to preface each <code class="language-plaintext highlighter-rouge">docker</code> command with <code class="language-plaintext highlighter-rouge">sudo</code>. To avoid having to use <code class="language-plaintext highlighter-rouge">sudo</code> with the <code class="language-plaintext highlighter-rouge">docker</code> command, your system administrator can create a Unix group called <code class="language-plaintext highlighter-rouge">docker</code> and add users to it.</p> <p>For more information about installing Docker or <code class="language-plaintext highlighter-rouge">sudo</code> configuration, refer to the <a href="https://docs.docker.com/install/">installation</a> instructions for your operating system.</p> <h2 id="environment-variables">Environment variables</h2> <p>The following list of environment variables are supported by the <code class="language-plaintext highlighter-rouge">docker</code> command line:</p> <table> <thead> <tr> <th style="text-align: left">Variable</th> <th style="text-align: left">Description</th> </tr> </thead> <tbody> <tr> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">DOCKER_API_VERSION</code></td> <td style="text-align: left">Override the negotiated API version to use for debugging (e.g. <code class="language-plaintext highlighter-rouge">1.19</code>)</td> </tr> <tr> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">DOCKER_CERT_PATH</code></td> <td style="text-align: left">Location of your authentication keys. This variable is used both by the <code class="language-plaintext highlighter-rouge">docker</code> CLI and the <a href="../dockerd/index"><code class="language-plaintext highlighter-rouge">dockerd</code> daemon</a>
+</td> </tr> <tr> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">DOCKER_CONFIG</code></td> <td style="text-align: left">The location of your client configuration files.</td> </tr> <tr> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">DOCKER_CONTENT_TRUST_SERVER</code></td> <td style="text-align: left">The URL of the Notary server to use. Defaults to the same URL as the registry.</td> </tr> <tr> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">DOCKER_CONTENT_TRUST</code></td> <td style="text-align: left">When set Docker uses notary to sign and verify images. Equates to <code class="language-plaintext highlighter-rouge">--disable-content-trust=false</code> for build, create, pull, push, run.</td> </tr> <tr> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">DOCKER_CONTEXT</code></td> <td style="text-align: left">Name of the <code class="language-plaintext highlighter-rouge">docker context</code> to use (overrides <code class="language-plaintext highlighter-rouge">DOCKER_HOST</code> env var and default context set with <code class="language-plaintext highlighter-rouge">docker context use</code>)</td> </tr> <tr> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">DOCKER_DEFAULT_PLATFORM</code></td> <td style="text-align: left">Default platform for commands that take the <code class="language-plaintext highlighter-rouge">--platform</code> flag.</td> </tr> <tr> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">DOCKER_HIDE_LEGACY_COMMANDS</code></td> <td style="text-align: left">When set, Docker hides “legacy” top-level commands (such as <code class="language-plaintext highlighter-rouge">docker rm</code>, and <code class="language-plaintext highlighter-rouge">docker pull</code>) in <code class="language-plaintext highlighter-rouge">docker help</code> output, and only <code class="language-plaintext highlighter-rouge">Management commands</code> per object-type (e.g., <code class="language-plaintext highlighter-rouge">docker container</code>) are printed. This may become the default in a future release, at which point this environment-variable is removed.</td> </tr> <tr> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">DOCKER_HOST</code></td> <td style="text-align: left">Daemon socket to connect to.</td> </tr> <tr> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">DOCKER_STACK_ORCHESTRATOR</code></td> <td style="text-align: left">Configure the default orchestrator to use when using <code class="language-plaintext highlighter-rouge">docker stack</code> management commands.</td> </tr> <tr> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">DOCKER_TLS_VERIFY</code></td> <td style="text-align: left">When set Docker uses TLS and verifies the remote. This variable is used both by the <code class="language-plaintext highlighter-rouge">docker</code> CLI and the <a href="../dockerd/index"><code class="language-plaintext highlighter-rouge">dockerd</code> daemon</a>
+</td> </tr> <tr> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">BUILDKIT_PROGRESS</code></td> <td style="text-align: left">Set type of progress output (<code class="language-plaintext highlighter-rouge">auto</code>, <code class="language-plaintext highlighter-rouge">plain</code>, <code class="language-plaintext highlighter-rouge">tty</code>) when <a href="../build/index">building</a> with <a href="../../builder/index#buildkit">BuildKit backend</a>. Use plain to show container output (default <code class="language-plaintext highlighter-rouge">auto</code>).</td> </tr> </tbody> </table> <p>Because Docker is developed using Go, you can also use any environment variables used by the Go runtime. In particular, you may find these useful:</p> <ul> <li><code class="language-plaintext highlighter-rouge">HTTP_PROXY</code></li> <li><code class="language-plaintext highlighter-rouge">HTTPS_PROXY</code></li> <li><code class="language-plaintext highlighter-rouge">NO_PROXY</code></li> </ul> <p>These Go environment variables are case-insensitive. See the <a href="https://golang.org/pkg/net/http/">Go specification</a> for details on these variables.</p> <h2 id="configuration-files">Configuration files</h2> <p>By default, the Docker command line stores its configuration files in a directory called <code class="language-plaintext highlighter-rouge">.docker</code> within your <code class="language-plaintext highlighter-rouge">$HOME</code> directory.</p> <p>Docker manages most of the files in the configuration directory and you should not modify them. However, you <em>can</em> modify the <code class="language-plaintext highlighter-rouge">config.json</code> file to control certain aspects of how the <code class="language-plaintext highlighter-rouge">docker</code> command behaves.</p> <p>You can modify the <code class="language-plaintext highlighter-rouge">docker</code> command behavior using environment variables or command-line options. You can also use options within <code class="language-plaintext highlighter-rouge">config.json</code> to modify some of the same behavior. If an environment variable and the <code class="language-plaintext highlighter-rouge">--config</code> flag are set, the flag takes precedent over the environment variable. Command line options override environment variables and environment variables override properties you specify in a <code class="language-plaintext highlighter-rouge">config.json</code> file.</p> <h3 id="change-the-docker-directory">Change the <code class="language-plaintext highlighter-rouge">.docker</code> directory</h3> <p>To specify a different directory, use the <code class="language-plaintext highlighter-rouge">DOCKER_CONFIG</code> environment variable or the <code class="language-plaintext highlighter-rouge">--config</code> command line option. If both are specified, then the <code class="language-plaintext highlighter-rouge">--config</code> option overrides the <code class="language-plaintext highlighter-rouge">DOCKER_CONFIG</code> environment variable. The example below overrides the <code class="language-plaintext highlighter-rouge">docker ps</code> command using a <code class="language-plaintext highlighter-rouge">config.json</code> file located in the <code class="language-plaintext highlighter-rouge">~/testconfigs/</code> directory.</p> <div class="highlight"><pre class="highlight" data-language="">$ docker --config ~/testconfigs/ ps
+</pre></div> <p>This flag only applies to whatever command is being ran. For persistent configuration, you can set the <code class="language-plaintext highlighter-rouge">DOCKER_CONFIG</code> environment variable in your shell (e.g. <code class="language-plaintext highlighter-rouge">~/.profile</code> or <code class="language-plaintext highlighter-rouge">~/.bashrc</code>). The example below sets the new directory to be <code class="language-plaintext highlighter-rouge">HOME/newdir/.docker</code>.</p> <div class="highlight"><pre class="highlight" data-language="">$ echo export DOCKER_CONFIG=$HOME/newdir/.docker &gt; ~/.profile
+</pre></div> <h2 id="docker-cli-configuration-file-configjson-properties">Docker CLI configuration file (<code class="language-plaintext highlighter-rouge">config.json</code>) properties</h2> <p>Use the Docker CLI configuration to customize settings for the <code class="language-plaintext highlighter-rouge">docker</code> CLI. The configuration file uses JSON formatting, and properties:</p> <p>By default, configuration file is stored in <code class="language-plaintext highlighter-rouge">~/.docker/config.json</code>. Refer to the <a href="#change-the-docker-directory">change the <code class="language-plaintext highlighter-rouge">.docker</code> directory</a> section to use a different location.</p> <blockquote> <p><strong>Warning</strong></p> <p>The configuration file and other files inside the <code class="language-plaintext highlighter-rouge">~/.docker</code> configuration directory may contain sensitive information, such as authentication information for proxies or, depending on your credential store, credentials for your image registries. Review your configuration file’s content before sharing with others, and prevent committing the file to version control.</p> </blockquote> <h3 id="customize-the-default-output-format-for-commands">Customize the default output format for commands</h3> <p>These fields allow you to customize the default output format for some commands if no <code class="language-plaintext highlighter-rouge">--format</code> flag is provided.</p> <table> <thead> <tr> <th style="text-align: left">Property</th> <th style="text-align: left">Description</th> </tr> </thead> <tbody> <tr> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">configFormat</code></td> <td style="text-align: left">Custom default format for <code class="language-plaintext highlighter-rouge">docker config ls</code> output. Refer to the <a href="../config_ls/index#format-the-output"><strong>format the output</strong> section in the <code class="language-plaintext highlighter-rouge">docker config ls</code> documentation</a> for a list of supported formatting directives.</td> </tr> <tr> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">imagesFormat</code></td> <td style="text-align: left">Custom default format for <code class="language-plaintext highlighter-rouge">docker images</code> / <code class="language-plaintext highlighter-rouge">docker image ls</code> output. Refer to the <a href="../images/index#format-the-output"><strong>format the output</strong> section in the <code class="language-plaintext highlighter-rouge">docker images</code> documentation</a> for a list of supported formatting directives.</td> </tr> <tr> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">nodesFormat</code></td> <td style="text-align: left">Custom default format for <code class="language-plaintext highlighter-rouge">docker node ls</code> output. Refer to the <a href="../node_ls/index#formatting"><strong>formatting</strong> section in the <code class="language-plaintext highlighter-rouge">docker node ls</code> documentation</a> for a list of supported formatting directives.</td> </tr> <tr> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">pluginsFormat</code></td> <td style="text-align: left">Custom default format for <code class="language-plaintext highlighter-rouge">docker plugin ls</code> output. Refer to the <a href="../plugin_ls/index#formatting"><strong>formatting</strong> section in the <code class="language-plaintext highlighter-rouge">docker plugin ls</code> documentation</a> for a list of supported formatting directives.</td> </tr> <tr> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">psFormat</code></td> <td style="text-align: left">Custom default format for <code class="language-plaintext highlighter-rouge">docker ps</code> / <code class="language-plaintext highlighter-rouge">docker container ps</code> output. Refer to the <a href="../ps/index#formatting"><strong>formatting</strong> section in the <code class="language-plaintext highlighter-rouge">docker ps</code> documentation</a> for a list of supported formatting directives.</td> </tr> <tr> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">secretFormat</code></td> <td style="text-align: left">Custom default format for <code class="language-plaintext highlighter-rouge">docker secret ls</code> output. Refer to the <a href="../secret_ls/index#format-the-output"><strong>format the output</strong> section in the <code class="language-plaintext highlighter-rouge">docker secret ls</code> documentation</a> for a list of supported formatting directives.</td> </tr> <tr> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">serviceInspectFormat</code></td> <td style="text-align: left">Custom default format for <code class="language-plaintext highlighter-rouge">docker service inspect</code> output. Refer to the <a href="../service_inspect/index#formatting"><strong>formatting</strong> section in the <code class="language-plaintext highlighter-rouge">docker service inspect</code> documentation</a> for a list of supported formatting directives.</td> </tr> <tr> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">servicesFormat</code></td> <td style="text-align: left">Custom default format for <code class="language-plaintext highlighter-rouge">docker service ls</code> output. Refer to the <a href="../service_ls/index#formatting"><strong>formatting</strong> section in the <code class="language-plaintext highlighter-rouge">docker service ls</code> documentation</a> for a list of supported formatting directives.</td> </tr> <tr> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">statsFormat</code></td> <td style="text-align: left">Custom default format for <code class="language-plaintext highlighter-rouge">docker stats</code> output. Refer to the <a href="../stats/index#formatting"><strong>formatting</strong> section in the <code class="language-plaintext highlighter-rouge">docker stats</code> documentation</a> for a list of supported formatting directives.</td> </tr> </tbody> </table> <h3 id="custom-http-headers">Custom HTTP headers</h3> <p>The property <code class="language-plaintext highlighter-rouge">HttpHeaders</code> specifies a set of headers to include in all messages sent from the Docker client to the daemon. Docker does not try to interpret or understand these headers; it simply puts them into the messages. Docker does not allow these headers to change any headers it sets for itself.</p> <h3 id="credential-store-options">Credential store options</h3> <p>The property <code class="language-plaintext highlighter-rouge">credsStore</code> specifies an external binary to serve as the default credential store. When this property is set, <code class="language-plaintext highlighter-rouge">docker login</code> will attempt to store credentials in the binary specified by <code class="language-plaintext highlighter-rouge">docker-credential-&lt;value&gt;</code> which is visible on <code class="language-plaintext highlighter-rouge">$PATH</code>. If this property is not set, credentials will be stored in the <code class="language-plaintext highlighter-rouge">auths</code> property of the config. For more information, see the <a href="../login/index#credentials-store"><strong>Credentials store</strong> section in the <code class="language-plaintext highlighter-rouge">docker login</code> documentation</a></p> <p>The property <code class="language-plaintext highlighter-rouge">credHelpers</code> specifies a set of credential helpers to use preferentially over <code class="language-plaintext highlighter-rouge">credsStore</code> or <code class="language-plaintext highlighter-rouge">auths</code> when storing and retrieving credentials for specific registries. If this property is set, the binary <code class="language-plaintext highlighter-rouge">docker-credential-&lt;value&gt;</code> will be used when storing or retrieving credentials for a specific registry. For more information, see the <a href="../login/index#credential-helpers"><strong>Credential helpers</strong> section in the <code class="language-plaintext highlighter-rouge">docker login</code> documentation</a></p> <h3 id="orchestrator-options-for-docker-stacks">Orchestrator options for docker stacks</h3> <p>The property <code class="language-plaintext highlighter-rouge">stackOrchestrator</code> specifies the default orchestrator to use when running <code class="language-plaintext highlighter-rouge">docker stack</code> management commands. Valid values are <code class="language-plaintext highlighter-rouge">"swarm"</code>, <code class="language-plaintext highlighter-rouge">"kubernetes"</code>, and <code class="language-plaintext highlighter-rouge">"all"</code>. This property can be overridden with the <code class="language-plaintext highlighter-rouge">DOCKER_STACK_ORCHESTRATOR</code> environment variable, or the <code class="language-plaintext highlighter-rouge">--orchestrator</code> flag.</p> <h3 id="automatic-proxy-configuration-for-containers">Automatic proxy configuration for containers</h3> <p>The property <code class="language-plaintext highlighter-rouge">proxies</code> specifies proxy environment variables to be automatically set on containers, and set as <code class="language-plaintext highlighter-rouge">--build-arg</code> on containers used during <code class="language-plaintext highlighter-rouge">docker build</code>. A <code class="language-plaintext highlighter-rouge">"default"</code> set of proxies can be configured, and will be used for any docker daemon that the client connects to, or a configuration per host (docker daemon), for example, “https://docker-daemon1.example.com”. The following properties can be set for each environment:</p> <table> <thead> <tr> <th style="text-align: left">Property</th> <th style="text-align: left">Description</th> </tr> </thead> <tbody> <tr> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">httpProxy</code></td> <td style="text-align: left">Default value of <code class="language-plaintext highlighter-rouge">HTTP_PROXY</code> and <code class="language-plaintext highlighter-rouge">http_proxy</code> for containers, and as <code class="language-plaintext highlighter-rouge">--build-arg</code> on <code class="language-plaintext highlighter-rouge">docker build</code>
+</td> </tr> <tr> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">httpsProxy</code></td> <td style="text-align: left">Default value of <code class="language-plaintext highlighter-rouge">HTTPS_PROXY</code> and <code class="language-plaintext highlighter-rouge">https_proxy</code> for containers, and as <code class="language-plaintext highlighter-rouge">--build-arg</code> on <code class="language-plaintext highlighter-rouge">docker build</code>
+</td> </tr> <tr> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">ftpProxy</code></td> <td style="text-align: left">Default value of <code class="language-plaintext highlighter-rouge">FTP_PROXY</code> and <code class="language-plaintext highlighter-rouge">ftp_proxy</code> for containers, and as <code class="language-plaintext highlighter-rouge">--build-arg</code> on <code class="language-plaintext highlighter-rouge">docker build</code>
+</td> </tr> <tr> <td style="text-align: left"><code class="language-plaintext highlighter-rouge">noProxy</code></td> <td style="text-align: left">Default value of <code class="language-plaintext highlighter-rouge">NO_PROXY</code> and <code class="language-plaintext highlighter-rouge">no_proxy</code> for containers, and as <code class="language-plaintext highlighter-rouge">--build-arg</code> on <code class="language-plaintext highlighter-rouge">docker build</code>
+</td> </tr> </tbody> </table> <p>These settings are used to configure proxy settings for containers only, and not used as proxy settings for the <code class="language-plaintext highlighter-rouge">docker</code> CLI or the <code class="language-plaintext highlighter-rouge">dockerd</code> daemon. Refer to the <a href="#environment-variables">environment variables</a> and <a href="https://docs.docker.com/config/daemon/systemd/#httphttps-proxy">HTTP/HTTPS proxy</a> sections for configuring proxy settings for the cli and daemon.</p> <blockquote> <p><strong>Warning</strong></p> <p>Proxy settings may contain sensitive information (for example, if the proxy requires authentication). Environment variables are stored as plain text in the container’s configuration, and as such can be inspected through the remote API or committed to an image when using <code class="language-plaintext highlighter-rouge">docker commit</code>.</p> </blockquote> <h3 id="default-key-sequence-to-detach-from-containers">Default key-sequence to detach from containers</h3> <p>Once attached to a container, users detach from it and leave it running using the using <code class="language-plaintext highlighter-rouge">CTRL-p CTRL-q</code> key sequence. This detach key sequence is customizable using the <code class="language-plaintext highlighter-rouge">detachKeys</code> property. Specify a <code class="language-plaintext highlighter-rouge">&lt;sequence&gt;</code> value for the property. The format of the <code class="language-plaintext highlighter-rouge">&lt;sequence&gt;</code> is a comma-separated list of either a letter [a-Z], or the <code class="language-plaintext highlighter-rouge">ctrl-</code> combined with any of the following:</p> <ul> <li>
+<code class="language-plaintext highlighter-rouge">a-z</code> (a single lowercase alpha character )</li> <li>
+<code class="language-plaintext highlighter-rouge">@</code> (at sign)</li> <li>
+<code class="language-plaintext highlighter-rouge">[</code> (left bracket)</li> <li>
+<code class="language-plaintext highlighter-rouge">\\</code> (two backward slashes)</li> <li>
+<code class="language-plaintext highlighter-rouge">_</code> (underscore)</li> <li>
+<code class="language-plaintext highlighter-rouge">^</code> (caret)</li> </ul> <p>Your customization applies to all containers started in with your Docker client. Users can override your custom or the default key sequence on a per-container basis. To do this, the user specifies the <code class="language-plaintext highlighter-rouge">--detach-keys</code> flag with the <code class="language-plaintext highlighter-rouge">docker attach</code>, <code class="language-plaintext highlighter-rouge">docker exec</code>, <code class="language-plaintext highlighter-rouge">docker run</code> or <code class="language-plaintext highlighter-rouge">docker start</code> command.</p> <h3 id="cli-plugin-options">CLI Plugin options</h3> <p>The property <code class="language-plaintext highlighter-rouge">plugins</code> contains settings specific to CLI plugins. The key is the plugin name, while the value is a further map of options, which are specific to that plugin.</p> <h3 id="sample-configuration-file">Sample configuration file</h3> <p>Following is a sample <code class="language-plaintext highlighter-rouge">config.json</code> file to illustrate the format used for various fields:</p> <div class="highlight"><pre class="highlight" data-language="">
+{
+ "HttpHeaders": {
+ "MyHeader": "MyValue"
+ },
+ "psFormat": "table {{.ID}}\\t{{.Image}}\\t{{.Command}}\\t{{.Labels}}",
+ "imagesFormat": "table {{.ID}}\\t{{.Repository}}\\t{{.Tag}}\\t{{.CreatedAt}}",
+ "pluginsFormat": "table {{.ID}}\t{{.Name}}\t{{.Enabled}}",
+ "statsFormat": "table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}",
+ "servicesFormat": "table {{.ID}}\t{{.Name}}\t{{.Mode}}",
+ "secretFormat": "table {{.ID}}\t{{.Name}}\t{{.CreatedAt}}\t{{.UpdatedAt}}",
+ "configFormat": "table {{.ID}}\t{{.Name}}\t{{.CreatedAt}}\t{{.UpdatedAt}}",
+ "serviceInspectFormat": "pretty",
+ "nodesFormat": "table {{.ID}}\t{{.Hostname}}\t{{.Availability}}",
+ "detachKeys": "ctrl-e,e",
+ "credsStore": "secretservice",
+ "credHelpers": {
+ "awesomereg.example.org": "hip-star",
+ "unicorn.example.com": "vcbait"
+ },
+ "stackOrchestrator": "kubernetes",
+ "plugins": {
+ "plugin1": {
+ "option": "value"
+ },
+ "plugin2": {
+ "anotheroption": "anothervalue",
+ "athirdoption": "athirdvalue"
+ }
+ },
+ "proxies": {
+ "default": {
+ "httpProxy": "http://user:pass@example.com:3128",
+ "httpsProxy": "https://my-proxy.example.com:3129",
+ "noProxy": "intra.mycorp.example.com",
+ "ftpProxy": "http://user:pass@example.com:3128"
+ },
+ "https://manager1.mycorp.example.com:2377": {
+ "httpProxy": "http://user:pass@example.com:3128",
+ "httpsProxy": "https://my-proxy.example.com:3129"
+ }
+ }
+}
+
+</pre></div> <h3 id="experimental-features">Experimental features</h3> <p>Experimental features provide early access to future product functionality. These features are intended for testing and feedback, and they may change between releases without warning or can be removed from a future release.</p> <p>Starting with Docker 20.10, experimental CLI features are enabled by default, and require no configuration to enable them.</p> <h3 id="notary">Notary</h3> <p>If using your own notary server and a self-signed certificate or an internal Certificate Authority, you need to place the certificate at <code class="language-plaintext highlighter-rouge">tls/&lt;registry_url&gt;/ca.crt</code> in your docker config directory.</p> <p>Alternatively you can trust the certificate globally by adding it to your system’s list of root Certificate Authorities.</p> <h2 id="examples">Examples</h2> <h3 id="display-help-text">Display help text</h3> <p>To list the help on any command just execute the command, followed by the <code class="language-plaintext highlighter-rouge">--help</code> option.</p> <div class="highlight"><pre class="highlight" data-language="">$ docker run --help
+
+Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
+
+Run a command in a new container
+
+Options:
+ --add-host value Add a custom host-to-IP mapping (host:ip) (default [])
+ -a, --attach value Attach to STDIN, STDOUT or STDERR (default [])
+&lt;...&gt;
+</pre></div> <h3 id="option-types">Option types</h3> <p>Single character command line options can be combined, so rather than typing <code class="language-plaintext highlighter-rouge">docker run -i -t --name test busybox sh</code>, you can write <code class="language-plaintext highlighter-rouge">docker run -it --name test busybox sh</code>.</p> <h4 id="boolean">Boolean</h4> <p>Boolean options take the form <code class="language-plaintext highlighter-rouge">-d=false</code>. The value you see in the help text is the default value which is set if you do <strong>not</strong> specify that flag. If you specify a Boolean flag without a value, this will set the flag to <code class="language-plaintext highlighter-rouge">true</code>, irrespective of the default value.</p> <p>For example, running <code class="language-plaintext highlighter-rouge">docker run -d</code> will set the value to <code class="language-plaintext highlighter-rouge">true</code>, so your container <strong>will</strong> run in “detached” mode, in the background.</p> <p>Options which default to <code class="language-plaintext highlighter-rouge">true</code> (e.g., <code class="language-plaintext highlighter-rouge">docker build --rm=true</code>) can only be set to the non-default value by explicitly setting them to <code class="language-plaintext highlighter-rouge">false</code>:</p> <div class="highlight"><pre class="highlight" data-language="">$ docker build --rm=false .
+</pre></div> <h4 id="multi">Multi</h4> <p>You can specify options like <code class="language-plaintext highlighter-rouge">-a=[]</code> multiple times in a single command line, for example in these commands:</p> <div class="highlight"><pre class="highlight" data-language="">$ docker run -a stdin -a stdout -i -t ubuntu /bin/bash
+
+$ docker run -a stdin -a stdout -a stderr ubuntu /bin/ls
+</pre></div> <p>Sometimes, multiple options can call for a more complex value string as for <code class="language-plaintext highlighter-rouge">-v</code>:</p> <div class="highlight"><pre class="highlight" data-language="">$ docker run -v /host:/container example/mysql
+</pre></div> <blockquote> <p><strong>Note</strong></p> <p>Do not use the <code class="language-plaintext highlighter-rouge">-t</code> and <code class="language-plaintext highlighter-rouge">-a stderr</code> options together due to limitations in the <code class="language-plaintext highlighter-rouge">pty</code> implementation. All <code class="language-plaintext highlighter-rouge">stderr</code> in <code class="language-plaintext highlighter-rouge">pty</code> mode simply goes to <code class="language-plaintext highlighter-rouge">stdout</code>.</p> </blockquote> <h4 id="strings-and-integers">Strings and Integers</h4> <p>Options like <code class="language-plaintext highlighter-rouge">--name=""</code> expect a string, and they can only be specified once. Options like <code class="language-plaintext highlighter-rouge">-c=0</code> expect an integer, and they can only be specified once.</p>
+<p><a href="https://docs.docker.com/search/?q=Docker">Docker</a>, <a href="https://docs.docker.com/search/?q=Docker%20documentation">Docker documentation</a>, <a href="https://docs.docker.com/search/?q=CLI">CLI</a>, <a href="https://docs.docker.com/search/?q=command%20line">command line</a>, <a href="https://docs.docker.com/search/?q=config.json">config.json</a>, <a href="https://docs.docker.com/search/?q=CLI%20configuration%20file">CLI configuration file</a></p>
+<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/cli/" class="_attribution-link">https://docs.docker.com/engine/reference/commandline/cli/</a>
+ </p>
+</div>