Commit graph

510 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 197f23da49)
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 fa1b82e5eb)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-08-11 17:56:47 -07:00
Steve Durrheimer
c573ad30b9 Add zsh completion for 'docker node rm --force'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit b58ef479a6)
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 46d3464362)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-08-11 17:56:46 -07:00
allencloud
e25a1ca19c update command description in CLI
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 6c5988ed8c)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-08-11 17:56:44 -07:00
Steve Durrheimer
d00d9dbbfb Add zsh completion for 'docker service {create,update} --container-label{-add,-rm}'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit ab95ec3dd9)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-08-11 17:56:43 -07:00
Steve Durrheimer
282dda382b Remove zsh completion for 'docker swarm inspect'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit f146f6127c)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-08-11 17:56:43 -07:00
Harald Albers
486d5aa47f Remove bash completion for docker swarm inspect
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 34d9a82409)
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 13c138ec2a)
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 0aa4e1e689)
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 57ae29aa74)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:24:43 -07:00
Steve Durrheimer
5aef7cc12d Add zsh completion for 'docker swarm join-token' command
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit a04bba8b89)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:18:14 -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 a0ccd0d42f)
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 42b4d6ebe4)
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 8426f72107)
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 f5e1f6f688,
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 c4ab20c5f8)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:17:01 -07:00
Aaron Lehmann
5d7a3f7b5f Replace secrets with join tokens
Implement the proposal from
https://github.com/docker/docker/issues/24430#issuecomment-233100121

Removes acceptance policy and secret in favor of an automatically
generated join token that combines the secret, CA hash, and
manager/worker role into a single opaque string.

Adds a docker swarm join-token subcommand to inspect and rotate the
tokens.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 2cc5bd33ee)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:16:59 -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 6c98d5bfac)
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 492fdf1f57)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:45 -07:00
Steve Durrheimer
80463d8000 Add zsh completion for 'docker node update --label-{add,rm}'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit cdb8383d7f)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:44 -07:00
Steve Durrheimer
b29a9fdc4b Add zsh completion for 'docker service {create,update} --log-{driver,opt}'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit 45484f5458)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:43 -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 bc6e3c0b5e)
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 823e161de7)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:41 -07:00
Sebastiaan van Stijn
4118e0c9ee Improve flag help consistency, and update docs
This adds the `--live-restore` option to the documentation.

Also synched usage description in the documentation
with the actual description, and re-phrased some
flag descriptions to be a bit more consistent.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 64a8317a5a)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:24 -07:00
Vincent Demeester
285bfa04ac Small zsh completion fix on --pretty & --no-resolve
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 698bd5ab65)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:13 -07:00
Steve Durrheimer
e4d263c99b Update zsh completion for 'docker service {create,update} {--endpoint-mode,--mode}'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit 2e6922a6d3)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:12 -07:00
Steve Durrheimer
f6dfc0394f Add zsh completion for 'dockerd --oom-score-adjust'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit 5d29732bdf)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:12 -07:00
Steve Durrheimer
5f8d7aa0f4 Add zsh completion for 'docker service {create,update} --registry-auth'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit 64f08906a2)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:11 -07:00
Steve Durrheimer
e204600ee1 Rename zsh completion for 'docker {create,run} --net --net-alias' to '--network --network-alias'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit ba5d9f63a3)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:11 -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 e1e310ea1f)
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 7bf0faf423)
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 e4a024d590)
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 c4846f6972)
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 a394490d38)
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 a44e71c427)
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 009d50e2d8)
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 715754ee61)
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 2b34fa0511)
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 a859a33647)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:33:21 -07:00
Jonathan Lomas
6b30370210 Remove unmatched bracket from _docker for zsh
Signed-off-by: Jonathan Lomas <jonathan@floatinglomas.ca>
(cherry picked from commit 7631dc80a6)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:32:22 -07:00
Steve Durrheimer
4cedd8fc23 Add zsh completion for 'docker service' commands
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit f5d768e2c5)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:32:09 -07:00
Steve Durrheimer
65e339bed1 Add zsh completion for 'docker daemon --runtimes' and 'docker run --runtime'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit a5c7eb607e)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:31:45 -07:00
Steve Durrheimer
dbdd38e421 Add zsh completion for 'docker swarm' commands
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit 2086663abd)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:31:44 -07:00
Steve Durrheimer
46a866ece9 Add zsh completion for 'docker node' commands
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit 024698718f)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:31:44 -07:00
allencloud
49981f8327 make cmd short short consistency and change docs
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 184afb92bf)
2016-06-30 17:11:29 -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 e3339a75d3)
2016-06-30 16:47:51 -07:00
Steve Durrheimer
790501e51f Add zsh completion for 'load' and 'save' image events
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit e2f1f699b3)
2016-06-30 16:47:45 -07:00
Steve Durrheimer
7b643a09d5 Add zsh completion for 'docker {create,run,network connect} --link-local-ip'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit 704d9b6864)
2016-06-30 16:47:44 -07:00
Steve Durrheimer
c6721ada67 Add zsh completion for 'docker run --storage-opt size='
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit 857e7d6ae4)
2016-06-30 16:47:44 -07:00
Steve Durrheimer
3714e9b393 Re-Add zsh completion for '-c' alias to '--cpu-shares'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit 4c23ac0ae5)
2016-06-30 16:47:44 -07:00