Mode | Description |
---|---|
none | No networking in the container. |
bridge (default) | Connect the container to the bridge via veth interfaces. |
host | Use the host's network stack inside the container. |
container:<name|id> | Use the network stack of another container, specified via its *name* or *id*. |
Policy | Result |
---|---|
no | Do not automatically restart the container when it exits. This is the default. |
on-failure[:max-retries] | Restart only if the container exits with a non-zero exit status. Optionally, limit the number of restart retries the Docker daemon attempts. |
always | Always restart the container regardless of the exit status. When you specify always, the Docker daemon will try to restart the container indefinitely. |
Option | Result |
---|---|
memory=inf, memory-swap=inf (default) | There is no memory limit for the container. The container can use as much memory as needed. |
memory=L<inf, memory-swap=inf |
(specify memory and set memory-swap as -1 ) The container is
not allowed to use more than L bytes of memory, but can use as much swap
as is needed (if the host supports swap memory).
|
memory=L<inf, memory-swap=2*L | (specify memory without memory-swap) The container is not allowed to use more than L bytes of memory, swap *plus* memory usage is double of that. |
memory=L<inf, memory-swap=S<inf, L<=S | (specify both memory and memory-swap) The container is not allowed to use more than L bytes of memory, swap *plus* memory usage is limited by S. |
Variable | Value |
---|---|
HOME |
Set based on the value of USER
|
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
|
TERM |
xterm if the container is allocated a psuedo-TTY |