Commit Graph

297 Commits

Author SHA1 Message Date
Harald Albers 98bbe72549 Fix bash completion for `docker service {create,update} {-e,--env}`
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 197f23da497d3d82f30beb6d920211f6d2055fa3)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-08-11 17:56:48 -07:00
Harald Albers af77d47c1f Fix bash completion for `docker swarm join --advertise-addr`
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit fa1b82e5ebc0e7dafe500e891c8b8c5fe5d4e1aa)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-08-11 17:56:47 -07:00
Harald Albers 4dc1afc961 Add bash completion for `docker node rm --force`
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 46d3464362f18a1eb6d37fc51b120d0f0614653a)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-08-11 17:56:46 -07:00
Harald Albers 486d5aa47f Remove bash completion for `docker swarm inspect`
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 34d9a8240914d30f3a8fe28c1b7d1d4e36d0657b)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-27 14:51:41 -07:00
Harald Albers 55b920c988 bash completion for container labels to `service {create,update}`
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 13c138ec2a896a87da8fa81693975e7ffbec85fd)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-27 14:51:41 -07:00
Stephen J Day 2f736927a0 cli: `docker service|node|stack ps` instead of tasks
Rather than conflict with the unexposed task model, change the names of
the object-oriented task display to `docker <object> ps`. The command
works identically to `docker service tasks`. This change is superficial.

This provides a more sensical docker experience while not trampling on
the task model that may be introduced as a top-level command at a later
date.

The following is an example of the display using `docker service ps`
with a service named `condescending_cori`:

```
$ docker service ps condescending_cori
ID                         NAME                  SERVICE             IMAGE   LAST STATE              DESIRED STATE  NODE
e2cd9vqb62qjk38lw65uoffd2  condescending_cori.1  condescending_cori  alpine  Running 13 minutes ago  Running        6c6d232a5d0e
```

The following shows the output for the node on which the command is
running:

```console
$ docker node ps self
ID                         NAME                  SERVICE             IMAGE   LAST STATE              DESIRED STATE  NODE
b1tpbi43k1ibevg2e94bmqo0s  mad_kalam.1           mad_kalam           apline  Accepted 2 seconds ago  Accepted       6c6d232a5d0e
e2cd9vqb62qjk38lw65uoffd2  condescending_cori.1  condescending_cori  alpine  Running 12 minutes ago  Running        6c6d232a5d0e
4x609m5o0qyn0kgpzvf0ad8x5  furious_davinci.1     furious_davinci     redis   Running 32 minutes ago  Running        6c6d232a5d0e
```

Signed-off-by: Stephen J Day <stephen.day@docker.com>
(cherry picked from commit 0aa4e1e68973ede0c73f8a4356e2a17fc903f549)
2016-07-27 11:20:25 -07:00
Aaron Lehmann a3639e6ac6 Add failure action for rolling updates
This changes the default behavior so that rolling updates will not
proceed once an updated task fails to start, or stops running during the
update. Users can use docker service inspect --pretty servicename to see
the update status, and if it pauses due to a failure, it will explain
that the update is paused, and show the task ID that caused it to pause.
It also shows the time since the update started.

A new --update-on-failure=(pause|continue) flag selects the
behavior. Pause means the update stops once a task fails, continue means
the old behavior of continuing the update anyway.

In the future this will be extended with additional behaviors like
automatic rollback, and flags controlling parameters like how many tasks
need to fail for the update to stop proceeding. This is a minimal
solution for 1.12.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 57ae29aa74e77ade3c91b1c77ba766512dae9ab4)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:24:43 -07:00
Aaron Lehmann 762a73bf7f Split advertised address from listen address
There are currently problems with "swarm init" and "swarm join" when an
explicit --listen-addr flag is not provided. swarmkit defaults to
finding the IP address associated with the default route, and in cloud
setups this is often the wrong choice.

Introduce a notion of "advertised address", with the client flag
--advertise-addr, and the daemon flag --swarm-default-advertise-addr to
provide a default. The default listening address is now 0.0.0.0, but a
valid advertised address must be detected or specified.

If no explicit advertised address is specified, error out if there is
more than one usable candidate IP address on the system. This requires a
user to explicitly choose instead of letting swarmkit make the wrong
choice. For the purposes of this autodetection, we ignore certain
interfaces that are unlikely to be relevant (currently docker*).

The user is also required to choose a listen address on swarm init if
they specify an explicit advertise address that is a hostname or an IP
address that's not local to the system. This is a requirement for
overlay networking.

Also support specifying interface names to --listen-addr,
--advertise-addr, and the daemon flag --swarm-default-advertise-addr.
This will fail if the interface has multiple IP addresses (unless it has
a single IPv4 address and a single IPv6 address - then we resolve the
tie in favor of IPv4).

This change also exposes the node's externally-reachable address in
docker info, as requested by #24017.

Make corresponding API and CLI docs changes.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit a0ccd0d42fdb0dd2005f67604cb81a5a6b26787e)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:18:03 -07:00
Harald Albers ac6d5a01c1 bash completion for `docker swarm join-token`
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 42b4d6ebe44029155d98d623c9d51f0cda89e194)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:17:02 -07:00
Vincent Demeester 9ec67fd8d1 Append --registry-auth with with
`--with-registry-auth` is more explicit.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 8426f72107f351b769babadeabbf13f205126514)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:17:01 -07:00
Sebastiaan van Stijn 83e40c5025 remove "secrets" from completion scripts
Swarm join has been changed in f5e1f6f6880391a5a3399023cf93a3c48502e57d,
removing various options and the "node accept" command.

This removes the removed options from the completion
scripts.

NOTE: a new command ("docker swarm join-token") was
also added, but is not part of this commit.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c4ab20c5f8c13d9d91dbd29fd41fc0d78f93ab0d)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:17:01 -07:00
Harald Albers 8e0e7644d8 Add manual support for macvlan networks to bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 6c98d5bfaccda4b211e537f5072767160a20d497)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:16:15 -07:00
Harald Albers 2d5716544d Update completions for syslog log driver options
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 492fdf1f57bff10bed5d44bf63f344c1d7961eb2)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:45 -07:00
Harald Albers 6c3019702e bash completion for `docker node update --label-{add,rm}`
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit bc6e3c0b5e415f09957955782b4d51e94a5ff2b9)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:41 -07:00
Harald Albers 4845b686b2 bash completion for `docker service {create,update} --log-{driver,opt}`
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 823e161de73e2df04cd3905b72b7916c49091af4)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:41 -07:00
Harald Albers 3bd6c0b8dd bash completion for `docker daemon --oom-score-adjust`
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit e1e310ea1fc47488a7404e3fa52fa606fe270ed0)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:14:58 -07:00
Sebastiaan van Stijn 7491ebe00a Remove shorthand flags for "mount", "pretty", and "no-resolve"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 7bf0faf42377a91a8535b443201d9ad62326889b)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:14:58 -07:00
Vincent Demeester cda05164ba Remove --command flag for service update
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit e4a024d5902df1d3db8b9fff8865304afa2305e6)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:14:57 -07:00
Harald Albers 8a810acb1e Change bash completion for `docker run --net*` to `--network*`
Ref: https://github.com/docker/docker/pull/23324

Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit c4846f697271d2990cca8481338f4827b2558112)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:13:49 -07:00
Harald Albers 9b0ebd26e8 Update bash completion for `docker service {create,update} {--mode,--endpoint-mode}`
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit a394490d3895fe0122b44a3f89acc04946b83bda)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:13:48 -07:00
Harald Albers fc4c8d927a bash completion for `docker service {create,update} --registry-auth`
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit a44e71c4274cd311e99722277cb674b2bc84d86e)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:13:48 -07:00
Harald Albers d8d1573b0d bash completion for default port on `docker swarm {init,join}`
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 009d50e2d8c4f74f38ebefe89b8dd44b69b46660)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:33:30 -07:00
Harald Albers 00a988c2ad bash completion can be configured to show node and service IDs
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 715754ee61a83a710f5c0c3974cfed6b453d5595)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:33:30 -07:00
Harald Albers 89bb424ce2 bash completion for `docker {service,node}` filters
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 2b34fa0511a5193b1cb07493555872cfd6b70442)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:33:30 -07:00
Vincent Demeester 23be238414 Use "on-failure" for both containers and services
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit a859a336475f39c7b7d7739c58a1dae40df86a86)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:33:21 -07:00
Harald Albers 795560dba2 bash completion enhancements for `docker {swarm,node,service}`
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit e3339a75d3d9e79ed5b8d372237ce5d2802910ba)
2016-06-30 16:47:51 -07:00
Harald Albers 5604fb2362 bash completion for `-c` alias to `--cpu-shares`
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 79296b2770b6d629a2e6ab02f888294a99f62153)
2016-06-30 16:47:42 -07:00
Harald Albers b23562ea20 bash completion for `docker daemon --storage-opt btrfs.min_space`
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit f693b99870031a6f5311defa9aba13b690323594)
2016-06-30 16:47:42 -07:00
Harald Albers 0afeae16de bash completion for `docker {run,create} --storage-opt`
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 7d2ffa00c08e2f316285fe2f9adf81255f5ae688)
2016-06-30 16:47:42 -07:00
Harald Albers 749f94e885 bash completion for `load` and `save` image events
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 5334520bf04598121b026c0b5018714fd4120d44)
2016-06-30 16:47:41 -07:00
Harald Albers 5188629256 bash completion for `docker daemon --storage-driver olverlay2`
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit d96eeff19416be61e7e021c9dfaed8728a177d02)
2016-06-30 16:47:41 -07:00
Harald Albers 9117c0dd41 bash completion for `docker {run,create,network connect} --link-local-ip`
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 98483f57ed984acd0d1c1f0de85c2b82c0308896)
2016-06-30 16:47:41 -07:00
Harald Albers 75193e58ce fix bash completion for `docker {swarm,node}` subcommands
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit e65f036e134c428b1303b00a8f08b0eea79f0701)
2016-06-30 16:47:38 -07:00
Harald Albers a4e3415235 correct sort order in new bash completions
The completion for the new `docker service`, `docker swarm` and
`docker node` command families were partly added in non-alphabetical
order.

Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 19753ec84dcd2961adf64c4c66b09a2f4ca3220a)
2016-06-30 16:47:38 -07:00
Mike Goelzer b8b938c61c Add bash completion for `docker service scale`
Signed-off-by: Mike Goelzer <mike.goelzer@docker.com>

Conflicts:
	contrib/completion/bash/docker

(cherry picked from commit 5cf73a47f5327c38b27400012333a9e569f1a584)
2016-06-30 16:47:38 -07:00
Harald Albers ffb4daf0fb fix bash completion for `docker service` subcommands
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 42f3b1f4adeb251e15ea0ca0af2a1e98cb9a7145)
2016-06-18 20:58:23 -07:00
Harald Albers fcdd4d4a52 bash completion for `docker swarm update --cert-expiry`
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit dc2fc75d4260767937d98ea81c51fdea148162b2)
2016-06-17 13:09:11 -07:00
Arnaud Porterie (icecrime) e6e1fd5d06
Make `--dispatcher-heartbeat-period` a duration
Make `--dispatcher-heartbeat-period` a duration in `docker swarm
update`, allowing to express the value as "5s", "1h", etc.

Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
2016-06-14 18:10:49 -07:00
Mike Goelzer 35e2970b98 Update bash completion for Docker 1.12 CLI commands
Signed-off-by: Mike Goelzer <mike.goelzer@docker.com>
2016-06-14 12:57:40 -07:00
Kenfe-Mickael Laventure 6e9bf4d316 Add bash completion support for --runtime and --add-runtime
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-06-14 07:47:31 -07:00
Kenfe-Mickael Laventure 1a6ed50e1f Add missing completion for --config-file
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-06-14 07:47:31 -07:00
Lei Jitang 74873f192a Merge pull request #23506 from albers/completion-daemon---live-restore
bash completion for `docker daemon --live-restore`
2016-06-14 17:24:00 +08:00
Harald Albers 73882e8f83 bash completion for `docker daemon --live-restore`
Signed-off-by: Harald Albers <github@albersweb.de>
2016-06-14 09:14:25 +02:00
Dmitry Smirnov 546594eaaa Fix syntax errors in bash-completion (Closes: #23483)
Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
2016-06-13 19:12:31 +10:00
Harald Albers 337eaab5d1 bash completion for `docker ps --filter network`
Signed-off-by: Harald Albers <github@albersweb.de>
2016-06-07 12:44:17 -07:00
Harald Albers e8c67e8d8d fix bash completion for dockerd with path
Signed-off-by: Harald Albers <github@albersweb.de>
2016-06-06 10:01:15 +02:00
Harald Albers 9c9cbd2c0f bash completion for detach events
Signed-off-by: Harald Albers <github@albersweb.de>
2016-06-05 08:41:58 -07:00
Vincent Demeester 5429f4ef61 Merge pull request #23239 from albers/completion-run-healthcheck
bash completion for `docker run` healthcheck options
2016-06-03 18:17:15 +02:00
Harald Albers f738e6a732 bash completion for `docker run` healthcheck options
Signed-off-by: Harald Albers <github@albersweb.de>
2016-06-03 17:04:04 +02:00
Harald Albers 4b5ccd7342 bash completion for `docker search --limit`
Signed-off-by: Harald Albers <github@albersweb.de>
2016-06-03 16:32:37 +02:00