From 03845511e3ab282a96cd99d8b733b9ee9c8940eb Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 14 Dec 2017 13:50:56 -0800 Subject: [PATCH 1/4] Fix "on-failure" restart policy being documented as "failure" Commit ddadd3db494ce568a6b847932677f837802ea6b5 refactored the markdown documentation, but accidentally changed `on-failure` to `failure`. This patch corrects this change. Signed-off-by: Sebastiaan van Stijn (cherry picked from commit 43217d733205b0694f791e7326bfed6d13b645f0) Signed-off-by: Sebastiaan van Stijn --- components/cli/docs/reference/commandline/run.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 From c01b9b91770b5a75bf0e7a25b0c4ba1babc43504 Mon Sep 17 00:00:00 2001 From: ktrysmt Date: Wed, 13 Dec 2017 17:35:12 +0900 Subject: [PATCH 2/4] Fixed #750 Signed-off-by: Kotaro Yoshimatsu (cherry picked from commit db05d8ad79e34e8096f31585fe9ffe0ce18f98d8) Signed-off-by: Sebastiaan van Stijn --- components/cli/contrib/completion/zsh/_docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From b63dd43fb31a2e1c8b4fab0aac3e3a38b4f42120 Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Wed, 13 Dec 2017 08:40:05 +0100 Subject: [PATCH 3/4] Add support for generic resources to bash completion Adds bash completion for - `service create --generic-resource` - `service update --generic-resource-(add|rm)` - `dockerd --node-generic-resource` Signed-off-by: Harald Albers (cherry picked from commit 8ec80eec672b93be03843412f195fae477e81c4a) Signed-off-by: Sebastiaan van Stijn --- components/cli/contrib/completion/bash/docker | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/cli/contrib/completion/bash/docker b/components/cli/contrib/completion/bash/docker index ba66c5bdae..73e655748e 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 @@ -3395,6 +3396,7 @@ _docker_service_update_and_create() { --dns-option --dns-search --env-file + --generic-resource --group --host --mode @@ -3456,6 +3458,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 From b827146463924b8fc347e2fbfd94fe3f66a2c995 Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Fri, 24 Nov 2017 15:50:16 +0100 Subject: [PATCH 4/4] Fix #512 Bash autocompletion works incorrect with inspect Signed-off-by: Harald Albers (cherry picked from commit a2d0b6e122021cfac87a99a46d3d02339552d281) Signed-off-by: Sebastiaan van Stijn --- components/cli/contrib/completion/bash/docker | 1 + 1 file changed, 1 insertion(+) diff --git a/components/cli/contrib/completion/bash/docker b/components/cli/contrib/completion/bash/docker index 73e655748e..ee5dde3c16 100644 --- a/components/cli/contrib/completion/bash/docker +++ b/components/cli/contrib/completion/bash/docker @@ -2866,6 +2866,7 @@ _docker_inspect() { $(__docker_services) $(__docker_volumes) " -- "$cur" ) ) + __ltrim_colon_completions "$cur" ;; container) __docker_complete_containers_all