diff --git a/components/cli/contrib/completion/bash/docker b/components/cli/contrib/completion/bash/docker index ba66c5bdae..ee5dde3c16 100644 --- a/components/cli/contrib/completion/bash/docker +++ b/components/cli/contrib/completion/bash/docker @@ -2220,6 +2220,7 @@ _docker_daemon() { --metrics-addr --mtu --network-control-plane-mtu + --node-generic-resource --oom-score-adjust --pidfile -p --registry-mirror @@ -2865,6 +2866,7 @@ _docker_inspect() { $(__docker_services) $(__docker_volumes) " -- "$cur" ) ) + __ltrim_colon_completions "$cur" ;; container) __docker_complete_containers_all @@ -3395,6 +3397,7 @@ _docker_service_update_and_create() { --dns-option --dns-search --env-file + --generic-resource --group --host --mode @@ -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 diff --git a/components/cli/contrib/completion/zsh/_docker b/components/cli/contrib/completion/zsh/_docker index d52aa913e4..e027877143 100644 --- a/components/cli/contrib/completion/zsh/_docker +++ b/components/cli/contrib/completion/zsh/_docker @@ -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 diff --git a/components/cli/docs/reference/commandline/run.md b/components/cli/docs/reference/commandline/run.md index b6f278c146..3188e7ab6f 100644 --- a/components/cli/docs/reference/commandline/run.md +++ b/components/cli/docs/reference/commandline/run.md @@ -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