Clarify that you can use -d and --rm together now

Signed-off-by: Misty Stanley-Jones <misty@docker.com>
This commit is contained in:
Misty Stanley-Jones 2017-07-03 16:39:47 -07:00
parent 85b41c3e71
commit c63485b47d

View File

@ -87,8 +87,9 @@ default foreground mode:
To start a container in detached mode, you use `-d=true` or just `-d` option. By To start a container in detached mode, you use `-d=true` or just `-d` option. By
design, containers started in detached mode exit when the root process used to design, containers started in detached mode exit when the root process used to
run the container exits. A container in detached mode cannot be automatically run the container exits, unless you also specify the `--rm` option. If you use
removed when it stops, this means you cannot use the `--rm` option with `-d` option. `-d` with `--rm`, the container is removed when it exits **or** when the daemon
exits, whichever happens first.
Do not pass a `service x start` command to a detached container. For example, this Do not pass a `service x start` command to a detached container. For example, this
command attempts to start the `nginx` service. command attempts to start the `nginx` service.
@ -149,7 +150,7 @@ is receiving its standard input from a pipe, as in:
The operator can identify a container in three ways: The operator can identify a container in three ways:
| Identifier type | Example value | | Identifier type | Example value |
| --------------------- | ------------------------------------------------------------------ | |:----------------------|:-------------------------------------------------------------------|
| UUID long identifier | "f78375b1c487e03c9438c729345e54db9d20cfa2ac1fc3494b6eb60872e74778" | | UUID long identifier | "f78375b1c487e03c9438c729345e54db9d20cfa2ac1fc3494b6eb60872e74778" |
| UUID short identifier | "f78375b1c487" | | UUID short identifier | "f78375b1c487" |
| Name | "evil_ptolemy" | | Name | "evil_ptolemy" |
@ -687,7 +688,7 @@ The operator can also adjust the performance parameters of the
container: container:
| Option | Description | | Option | Description |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | |:---------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `-m`, `--memory=""` | Memory limit (format: `<number>[<unit>]`). Number is a positive integer. Unit can be one of `b`, `k`, `m`, or `g`. Minimum is 4M. | | `-m`, `--memory=""` | Memory limit (format: `<number>[<unit>]`). Number is a positive integer. Unit can be one of `b`, `k`, `m`, or `g`. Minimum is 4M. |
| `--memory-swap=""` | Total memory limit (memory + swap, format: `<number>[<unit>]`). Number is a positive integer. Unit can be one of `b`, `k`, `m`, or `g`. | | `--memory-swap=""` | Total memory limit (memory + swap, format: `<number>[<unit>]`). Number is a positive integer. Unit can be one of `b`, `k`, `m`, or `g`. |
| `--memory-reservation=""` | Memory soft limit (format: `<number>[<unit>]`). Number is a positive integer. Unit can be one of `b`, `k`, `m`, or `g`. | | `--memory-reservation=""` | Memory soft limit (format: `<number>[<unit>]`). Number is a positive integer. Unit can be one of `b`, `k`, `m`, or `g`. |
@ -1158,7 +1159,7 @@ list of capabilities that are kept. The following table lists the Linux capabili
options which are allowed by default and can be dropped. options which are allowed by default and can be dropped.
| Capability Key | Capability Description | | Capability Key | Capability Description |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------- | |:-----------------|:------------------------------------------------------------------------------------------------------------------------------|
| SETPCAP | Modify process capabilities. | | SETPCAP | Modify process capabilities. |
| MKNOD | Create special files using mknod(2). | | MKNOD | Create special files using mknod(2). |
| AUDIT_WRITE | Write records to kernel auditing log. | | AUDIT_WRITE | Write records to kernel auditing log. |
@ -1177,7 +1178,7 @@ options which are allowed by default and can be dropped.
The next table shows the capabilities which are not granted by default and may be added. The next table shows the capabilities which are not granted by default and may be added.
| Capability Key | Capability Description | | Capability Key | Capability Description |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------- | |:----------------|:----------------------------------------------------------------------------------------------------------------|
| SYS_MODULE | Load and unload kernel modules. | | SYS_MODULE | Load and unload kernel modules. |
| SYS_RAWIO | Perform I/O port operations (iopl(2) and ioperm(2)). | | SYS_RAWIO | Perform I/O port operations (iopl(2) and ioperm(2)). |
| SYS_PACCT | Use acct(2), switch process accounting on or off. | | SYS_PACCT | Use acct(2), switch process accounting on or off. |
@ -1252,7 +1253,7 @@ the `--log-driver=VALUE` with the `docker run` command to configure the
container's logging driver. The following options are supported: container's logging driver. The following options are supported:
| Driver | Description | | Driver | Description |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------- | |:------------|:------------------------------------------------------------------------------------------------------------------------------|
| `none` | Disables any logging for the container. `docker logs` won't be available with this driver. | | `none` | Disables any logging for the container. `docker logs` won't be available with this driver. |
| `json-file` | Default logging driver for Docker. Writes JSON messages to file. No logging options are supported for this driver. | | `json-file` | Default logging driver for Docker. Writes JSON messages to file. No logging options are supported for this driver. |
| `syslog` | Syslog logging driver for Docker. Writes log messages to syslog. | | `syslog` | Syslog logging driver for Docker. Writes log messages to syslog. |
@ -1399,7 +1400,7 @@ container.
The following environment variables are set for Linux containers: The following environment variables are set for Linux containers:
| Variable | Value | | Variable | Value |
| -------- | ----- | |:-----------|:-----------------------------------------------------------------------------------------------------|
| `HOME` | Set based on the value of `USER` | | `HOME` | Set based on the value of `USER` |
| `HOSTNAME` | The hostname associated with the container | | `HOSTNAME` | The hostname associated with the container |
| `PATH` | Includes popular directories, such as `/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin` | | `PATH` | Includes popular directories, such as `/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin` |