Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions components/cli/contrib/completion/bash/docker
Original file line number Diff line number Diff line change
Expand Up @@ -2220,6 +2220,7 @@ _docker_daemon() {
--metrics-addr
--mtu
--network-control-plane-mtu
--node-generic-resource
--oom-score-adjust
--pidfile -p
--registry-mirror
Expand Down Expand Up @@ -2865,6 +2866,7 @@ _docker_inspect() {
$(__docker_services)
$(__docker_volumes)
" -- "$cur" ) )
__ltrim_colon_completions "$cur"
;;
container)
__docker_complete_containers_all
Expand Down Expand Up @@ -3395,6 +3397,7 @@ _docker_service_update_and_create() {
--dns-option
--dns-search
--env-file
--generic-resource
--group
--host
--mode
Expand Down Expand Up @@ -3456,6 +3459,8 @@ _docker_service_update_and_create() {
--dns-rm
--dns-search-add
--dns-search-rm
--generic-resource-add
--generic-resource-rm
--group-add
--group-rm
--host-add
Expand Down
2 changes: 1 addition & 1 deletion components/cli/contrib/completion/zsh/_docker
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ __docker_container_subcommand() {
"($help)--privileged[Give extended Linux capabilities to the command]" \
"($help -t --tty)"{-t,--tty}"[Allocate a pseudo-tty]" \
"($help -u --user)"{-u=,--user=}"[Username or UID]:user:_users" \
"($help -w --workdir)"{-w=,--workdir=}"[Working directory inside the container]:directory:_directories"
"($help -w --workdir)"{-w=,--workdir=}"[Working directory inside the container]:directory:_directories" \
"($help -):containers:__docker_complete_running_containers" \
"($help -)*::command:->anycommand" && ret=0
case $state in
Expand Down
10 changes: 5 additions & 5 deletions components/cli/docs/reference/commandline/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -588,11 +588,11 @@ Use Docker's `--restart` to specify a container's *restart policy*. A restart
policy controls whether the Docker daemon restarts a container after exit.
Docker supports the following restart policies:

| Policy | Result |
|:----------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `no` | Do not automatically restart the container when it exits. This is the default. |
| `failure` | 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. The container will also always start on daemon startup, regardless of the current state of the container. |
| 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. The container will also always start on daemon startup, regardless of the current state of the container. |

```bash
$ docker run --restart=always redis
Expand Down