mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #11715 from duglin/DocCliEnvVars
Add some info about what environment variables are available
This commit is contained in:
commit
dea660874c
1 changed files with 32 additions and 8 deletions
|
@ -17,6 +17,30 @@ or execute `docker help`:
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|
||||||
|
## Environment Variables
|
||||||
|
|
||||||
|
For easy reference, the following list of environment variables are supported
|
||||||
|
by the `docker` command line:
|
||||||
|
|
||||||
|
* `DOCKER_CERT_PATH` The location of your authentication keys.
|
||||||
|
* `DOCKER_DRIVER` The graph driver to use.
|
||||||
|
* `DOCKER_HOST` Daemon socket to connect to.
|
||||||
|
* `DOCKER_NOWARN_KERNEL_VERSION` Prevent warnings that your Linux kernel is unsuitable for Docker.
|
||||||
|
* `DOCKER_RAMDISK` If set this will disable 'pivot_root'.
|
||||||
|
* `DOCKER_TLS_VERIFY` When set Docker uses TLS and verifies the remote.
|
||||||
|
* `DOCKER_TMPDIR` Location for temporary Docker files.
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
* `HTTP_PROXY`
|
||||||
|
* `HTTPS_PROXY`
|
||||||
|
* `NO_PROXY`
|
||||||
|
|
||||||
|
These Go environment variables are case-insensitive. See the
|
||||||
|
[Go specification](http://golang.org/pkg/net/http/) for details on these
|
||||||
|
variables.
|
||||||
|
|
||||||
## Help
|
## Help
|
||||||
To list the help on any command just execute the command, followed by the `--help` option.
|
To list the help on any command just execute the command, followed by the `--help` option.
|
||||||
|
|
||||||
|
@ -539,7 +563,7 @@ Instead of specifying a context, you can pass a single Dockerfile in the
|
||||||
docker build - < Dockerfile
|
docker build - < Dockerfile
|
||||||
|
|
||||||
If you use STDIN or specify a `URL`, the system places the contents into a
|
If you use STDIN or specify a `URL`, the system places the contents into a
|
||||||
file called `Dockerfile`, and any `-f`, `--file` option is ignored. In this
|
file called `Dockerfile`, and any `-f`, `--file` option is ignored. In this
|
||||||
scenario, there is no context.
|
scenario, there is no context.
|
||||||
|
|
||||||
### Return code
|
### Return code
|
||||||
|
@ -795,7 +819,7 @@ relative to the root of the container's filesystem.
|
||||||
|
|
||||||
Usage: docker cp CONTAINER:PATH HOSTDIR|-
|
Usage: docker cp CONTAINER:PATH HOSTDIR|-
|
||||||
|
|
||||||
Copy files/folders from the PATH to the HOSTDIR.
|
Copy files/folders from the PATH to the HOSTDIR.
|
||||||
|
|
||||||
|
|
||||||
## create
|
## create
|
||||||
|
@ -1530,7 +1554,7 @@ just a specific mapping:
|
||||||
--before="" Show only container created before Id or Name
|
--before="" Show only container created before Id or Name
|
||||||
-f, --filter=[] Filter output based on conditions provided
|
-f, --filter=[] Filter output based on conditions provided
|
||||||
-l, --latest=false Show the latest created container, include non-running
|
-l, --latest=false Show the latest created container, include non-running
|
||||||
-n=-1 Show n last created containers, include non-running
|
-n=-1 Show n last created containers, include non-running
|
||||||
--no-trunc=false Don't truncate output
|
--no-trunc=false Don't truncate output
|
||||||
-q, --quiet=false Only display numeric IDs
|
-q, --quiet=false Only display numeric IDs
|
||||||
-s, --size=false Display total file sizes
|
-s, --size=false Display total file sizes
|
||||||
|
@ -1950,7 +1974,7 @@ format:
|
||||||
com.example.label2=another\ label
|
com.example.label2=another\ label
|
||||||
com.example.label3
|
com.example.label3
|
||||||
|
|
||||||
You can load multiple label-files by supplying multiple `--label-file` flags.
|
You can load multiple label-files by supplying multiple `--label-file` flags.
|
||||||
|
|
||||||
For additional information on working with labels, see [*Labels - custom
|
For additional information on working with labels, see [*Labels - custom
|
||||||
metadata in Docker*](/userguide/labels-custom-metadata/) in the Docker User
|
metadata in Docker*](/userguide/labels-custom-metadata/) in the Docker User
|
||||||
|
@ -2064,7 +2088,7 @@ application change:
|
||||||
|
|
||||||
#### Restart Policies
|
#### Restart Policies
|
||||||
|
|
||||||
Use Docker's `--restart` to specify a container's *restart policy*. A restart
|
Use Docker's `--restart` to specify a container's *restart policy*. A restart
|
||||||
policy controls whether the Docker daemon restarts a container after exit.
|
policy controls whether the Docker daemon restarts a container after exit.
|
||||||
Docker supports the following restart policies:
|
Docker supports the following restart policies:
|
||||||
|
|
||||||
|
@ -2079,7 +2103,7 @@ Docker supports the following restart policies:
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>no</strong></td>
|
<td><strong>no</strong></td>
|
||||||
<td>
|
<td>
|
||||||
Do not automatically restart the container when it exits. This is the
|
Do not automatically restart the container when it exits. This is the
|
||||||
default.
|
default.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -2091,7 +2115,7 @@ Docker supports the following restart policies:
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
Restart only if the container exits with a non-zero exit status.
|
Restart only if the container exits with a non-zero exit status.
|
||||||
Optionally, limit the number of restart retries the Docker
|
Optionally, limit the number of restart retries the Docker
|
||||||
daemon attempts.
|
daemon attempts.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -2111,7 +2135,7 @@ Docker supports the following restart policies:
|
||||||
This will run the `redis` container with a restart policy of **always**
|
This will run the `redis` container with a restart policy of **always**
|
||||||
so that if the container exits, Docker will restart it.
|
so that if the container exits, Docker will restart it.
|
||||||
|
|
||||||
More detailed information on restart policies can be found in the
|
More detailed information on restart policies can be found in the
|
||||||
[Restart Policies (--restart)](/reference/run/#restart-policies-restart) section
|
[Restart Policies (--restart)](/reference/run/#restart-policies-restart) section
|
||||||
of the Docker run reference page.
|
of the Docker run reference page.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue