1
0
mirror of https://github.com/docker/cli.git synced 2025-07-30 17:03:07 +03:00

Add unless-stopped restart policy

Fixes #11008

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2015-08-05 14:09:08 -07:00
committed by Tibor Vass
parent e1733b4db6
commit df39b0146b
5 changed files with 24 additions and 6 deletions

View File

@ -59,7 +59,7 @@ Creates a new container.
--pid="" PID namespace to use
--privileged=false Give extended privileges to this container
--read-only=false Mount the container's root filesystem as read only
--restart="no" Restart policy (no, on-failure[:max-retry], always)
--restart="no" Restart policy (no, on-failure[:max-retry], always, unless-stopped)
--security-opt=[] Security options
-t, --tty=false Allocate a pseudo-TTY
--disable-content-trust=true Skip image verification

View File

@ -59,7 +59,7 @@ weight=1
--pid="" PID namespace to use
--privileged=false Give extended privileges to this container
--read-only=false Mount the container's root filesystem as read only
--restart="no" Restart policy (no, on-failure[:max-retry], always)
--restart="no" Restart policy (no, on-failure[:max-retry], always, unless-stopped)
--rm=false Automatically remove the container when it exits
--security-opt=[] Security Options
--sig-proxy=true Proxy received signals to the process
@ -441,7 +441,16 @@ Docker supports the following restart policies:
<td>
Always restart the container regardless of the exit status.
When you specify always, the Docker daemon will try to restart
the container indefinitely.
the container indefinitely. The container will also always start
on daemon startup, regardless of the current state of the container.
</td>
</tr>
<tr>
<td><strong>unless-stopped</strong></td>
<td>
Always restart the container regardless of the exit status, but
do not start it on daemon startup if the container has been put
to a stopped state before.
</td>
</tr>
</tbody>