mirror of
https://github.com/docker/cli.git
synced 2026-01-13 18:22:35 +03:00
Fixed #5283 - literal leftover from cutover
Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
This commit is contained in:
committed by
Tibor Vass
parent
35710efce1
commit
57acc3cd5d
@@ -254,9 +254,9 @@ All new files and directories are created with mode 0755, uid and gid 0.
|
||||
|
||||
Note
|
||||
|
||||
if you build using STDIN (`docker build - < somefile`
|
||||
.literal}), there is no build context, so the Dockerfile can only
|
||||
contain an URL based ADD statement.
|
||||
if you build using STDIN (`docker build - < somefile`), there is no
|
||||
build context, so the Dockerfile can only contain an URL based ADD
|
||||
statement.
|
||||
|
||||
Note
|
||||
|
||||
@@ -335,12 +335,11 @@ that you can run as an executable. That is, when you specify an
|
||||
`ENTRYPOINT`, then the whole container runs as if it
|
||||
was just that executable.
|
||||
|
||||
The `ENTRYPOINT` instruction adds an entry command
|
||||
that will **not** be overwritten when arguments are passed to
|
||||
`docker run`, unlike the behavior of `CMD`
|
||||
.literal}. This allows arguments to be passed to the entrypoint. i.e.
|
||||
`docker run <image> -d` will pass the "-d" argument
|
||||
to the ENTRYPOINT.
|
||||
The `ENTRYPOINT` instruction adds an entry command that will **not** be
|
||||
overwritten when arguments are passed to `docker run`, unlike the
|
||||
behavior of `CMD`. This allows arguments to be passed to the entrypoint.
|
||||
i.e. `docker run <image> -d` will pass the "-d" argument to the
|
||||
ENTRYPOINT.
|
||||
|
||||
You can specify parameters either in the ENTRYPOINT JSON array (as in
|
||||
"like an exec" above), or by using a CMD statement. Parameters in the
|
||||
|
||||
@@ -19,8 +19,7 @@ no parameters or execute `docker help`:
|
||||
|
||||
Single character commandline options can be combined, so rather than
|
||||
typing `docker run -t -i --name test busybox sh`,
|
||||
you can write `docker run -ti --name test busybox sh`
|
||||
.literal}.
|
||||
you can write `docker run -ti --name test busybox sh`.
|
||||
|
||||
### Boolean
|
||||
|
||||
@@ -92,11 +91,9 @@ To set the DNS server for all Docker containers, use
|
||||
To set the DNS search domain for all Docker containers, use
|
||||
`docker -d --dns-search example.com`.
|
||||
|
||||
To run the daemon with debug output, use `docker -d -D`
|
||||
.literal}.
|
||||
To run the daemon with debug output, use `docker -d -D`.
|
||||
|
||||
To use lxc as the execution driver, use `docker -d -e lxc`
|
||||
.literal}.
|
||||
To use lxc as the execution driver, use `docker -d -e lxc`.
|
||||
|
||||
The docker client will also honor the `DOCKER_HOST`
|
||||
environment variable to set the `-H` flag for the
|
||||
@@ -119,8 +116,7 @@ systemd in the [docker source
|
||||
tree](https://github.com/dotcloud/docker/blob/master/contrib/init/systemd/socket-activation/).
|
||||
|
||||
Docker supports softlinks for the Docker data directory
|
||||
(`/var/lib/docker`) and for `/tmp`
|
||||
.literal}. TMPDIR and the data directory can be set like this:
|
||||
(`/var/lib/docker`) and for `/tmp`. TMPDIR and the data directory can be set like this:
|
||||
|
||||
TMPDIR=/mnt/disk2/tmp /usr/local/bin/docker -d -D -g /var/lib/docker -H unix:// > /var/lib/boot2docker/docker.log 2>&1
|
||||
# or
|
||||
@@ -254,8 +250,7 @@ machine and that no parsing of the `Dockerfile`
|
||||
happens at the client side (where you’re running
|
||||
`docker build`). That means that *all* the files at
|
||||
`PATH` get sent, not just the ones listed to
|
||||
[*ADD*](../../builder/#dockerfile-add) in the `Dockerfile`
|
||||
.literal}.
|
||||
[*ADD*](../../builder/#dockerfile-add) in the `Dockerfile`.
|
||||
|
||||
The transfer of context from the local machine to the Docker daemon is
|
||||
what the `docker` client means when you see the
|
||||
@@ -658,9 +653,8 @@ Restores both images and tags.
|
||||
The `docker logs` command batch-retrieves all logs
|
||||
present at the time of execution.
|
||||
|
||||
The `docker logs --follow` command combines
|
||||
`docker logs` and `docker attach`
|
||||
.literal}: it will first return all logs from the beginning and then
|
||||
The `docker logs --follow` command combines `docker logs` and `docker
|
||||
attach`: it will first return all logs from the beginning and then
|
||||
continue streaming new output from the container’s stdout and stderr.
|
||||
|
||||
## `port`
|
||||
@@ -957,10 +951,8 @@ container). All three flags, `-e`, `--env`
|
||||
and `--env-file` can be repeated.
|
||||
|
||||
Regardless of the order of these three flags, the `--env-file`
|
||||
are processed first, and then `-e`
|
||||
.literal}/`--env` flags. This way, the
|
||||
`-e` or `--env` will override
|
||||
variables as needed.
|
||||
are processed first, and then `-e`, `--env` flags. This way, the
|
||||
`-e` or `--env` will override variables as needed.
|
||||
|
||||
$ cat ./env.list
|
||||
TEST_FOO=BAR
|
||||
|
||||
@@ -46,8 +46,8 @@ and nearly all the defaults set by the Docker runtime itself.
|
||||
|
||||
## [Operator Exclusive Options](#id4)
|
||||
|
||||
Only the operator (the person executing `docker run`
|
||||
.literal}) can set the following options.
|
||||
Only the operator (the person executing `docker run`) can set the
|
||||
following options.
|
||||
|
||||
- [Detached vs Foreground](#detached-vs-foreground)
|
||||
- [Detached (-d)](#detached-d)
|
||||
@@ -72,14 +72,12 @@ default foreground mode:
|
||||
|
||||
#### [Detached (-d)](#id3)
|
||||
|
||||
In detached mode (`-d=true` or just `-d`
|
||||
.literal}), all I/O should be done through network connections or shared
|
||||
volumes because the container is no longer listening to the commandline
|
||||
where you executed `docker run`. You can reattach to
|
||||
a detached container with `docker`
|
||||
In detached mode (`-d=true` or just `-d`), all I/O should be done
|
||||
through network connections or shared volumes because the container is
|
||||
no longer listening to the commandline where you executed `docker run`.
|
||||
You can reattach to a detached container with `docker`
|
||||
[*attach*](../commandline/cli/#cli-attach). If you choose to run a
|
||||
container in the detached mode, then you cannot use the `--rm`
|
||||
option.
|
||||
container in the detached mode, then you cannot use the `--rm` option.
|
||||
|
||||
#### [Foreground](#id4)
|
||||
|
||||
@@ -196,12 +194,12 @@ by default a container is not allowed to access any devices, but a
|
||||
and documentation on [cgroups
|
||||
devices](https://www.kernel.org/doc/Documentation/cgroups/devices.txt)).
|
||||
|
||||
When the operator executes `docker run --privileged`
|
||||
.literal}, Docker will enable to access to all devices on the host as
|
||||
well as set some configuration in AppArmor to allow the container nearly
|
||||
all the same access to the host as processes running outside containers
|
||||
on the host. Additional information about running with
|
||||
`--privileged` is available on the [Docker
|
||||
When the operator executes `docker run --privileged`, Docker will enable
|
||||
to access to all devices on the host as well as set some configuration
|
||||
in AppArmor to allow the container nearly all the same access to the
|
||||
host as processes running outside containers on the host. Additional
|
||||
information about running with `--privileged` is available on the
|
||||
[Docker
|
||||
Blog](http://blog.docker.io/2013/09/docker-can-now-run-within-docker/).
|
||||
|
||||
If the Docker daemon was started using the `lxc`
|
||||
@@ -259,19 +257,17 @@ as arguments to the `ENTRYPOINT`.
|
||||
|
||||
--entrypoint="": Overwrite the default entrypoint set by the image
|
||||
|
||||
The ENTRYPOINT of an image is similar to a `COMMAND`
|
||||
because it specifies what executable to run when the container starts,
|
||||
but it is (purposely) more difficult to override. The
|
||||
`ENTRYPOINT` gives a container its default nature or
|
||||
behavior, so that when you set an `ENTRYPOINT` you
|
||||
can run the container *as if it were that binary*, complete with default
|
||||
options, and you can pass in more options via the `COMMAND`
|
||||
.literal}. But, sometimes an operator may want to run something else
|
||||
inside the container, so you can override the default
|
||||
`ENTRYPOINT` at runtime by using a string to specify
|
||||
the new `ENTRYPOINT`. Here is an example of how to
|
||||
run a shell in a container that has been set up to automatically run
|
||||
something else (like `/usr/bin/redis-server`):
|
||||
The ENTRYPOINT of an image is similar to a `COMMAND` because it
|
||||
specifies what executable to run when the container starts, but it is
|
||||
(purposely) more difficult to override. The `ENTRYPOINT` gives a
|
||||
container its default nature or behavior, so that when you set an
|
||||
`ENTRYPOINT` you can run the container *as if it were that binary*,
|
||||
complete with default options, and you can pass in more options via the
|
||||
`COMMAND`. But, sometimes an operator may want to run something else
|
||||
inside the container, so you can override the default `ENTRYPOINT` at
|
||||
runtime by using a string to specify the new `ENTRYPOINT`. Here is an
|
||||
example of how to run a shell in a container that has been set up to
|
||||
automatically run something else (like `/usr/bin/redis-server`):
|
||||
|
||||
docker run -i -t --entrypoint /bin/bash example/redis
|
||||
|
||||
@@ -330,8 +326,7 @@ port to use.
|
||||
|
||||
The operator can **set any environment variable** in the container by
|
||||
using one or more `-e` flags, even overriding those
|
||||
already defined by the developer with a Dockefile `ENV`
|
||||
.literal}:
|
||||
already defined by the developer with a Dockefile `ENV`:
|
||||
|
||||
$ docker run -e "deep=purple" --rm ubuntu /bin/bash -c export
|
||||
declare -x HOME="/"
|
||||
@@ -343,8 +338,7 @@ already defined by the developer with a Dockefile `ENV`
|
||||
declare -x container="lxc"
|
||||
declare -x deep="purple"
|
||||
|
||||
Similarly the operator can set the **hostname** with `-h`
|
||||
.literal}.
|
||||
Similarly the operator can set the **hostname** with `-h`.
|
||||
|
||||
`--link name:alias` also sets environment variables,
|
||||
using the *alias* string to define environment variables within the
|
||||
|
||||
Reference in New Issue
Block a user