Commit Graph

239 Commits

Author SHA1 Message Date
609c7c0bcb 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>
Upstream-commit: 18cd5ac352
Component: cli
2017-06-02 00:10:02 +00:00
9244292285 bash completion for docker swarm join-token
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: a35ae076b4
Component: cli
2017-06-02 00:10:02 +00:00
a677374f33 Append --registry-auth with with
`--with-registry-auth` is more explicit.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 2f9e9bcbaa
Component: cli
2017-06-02 00:10:02 +00:00
de76192c9e 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>
Upstream-commit: 6eef41333d
Component: cli
2017-06-02 00:10:02 +00:00
0ef7be695f Add manual support for macvlan networks to bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 6218da47b1
Component: cli
2017-06-02 00:10:01 +00:00
0c50f823f7 Update completions for syslog log driver options
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 1f0b0b007c
Component: cli
2017-06-02 00:10:01 +00:00
87d34bb5c1 bash completion for docker node update --label-{add,rm}
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 56491f1caa
Component: cli
2017-06-02 00:07:51 +00:00
09c5057193 bash completion for docker service {create,update} --log-{driver,opt}
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: cbaa143737
Component: cli
2017-06-02 00:07:51 +00:00
a32637bf7a bash completion for docker daemon --oom-score-adjust
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 94092e24a7
Component: cli
2017-06-02 00:07:50 +00:00
857bcf3a13 Remove shorthand flags for "mount", "pretty", and "no-resolve"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c33bc7d99e
Component: cli
2017-06-02 00:07:50 +00:00
34f04d67ef Remove --command flag for service update
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 2e844f5e8d
Component: cli
2017-06-02 00:07:50 +00:00
8070cdebc7 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>
Upstream-commit: 5ad5dc4baf
Component: cli
2017-06-02 00:07:50 +00:00
e8780adb60 Update bash completion for docker service {create,update} {--mode,--endpoint-mode}
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: a94dee25fc
Component: cli
2017-06-02 00:07:50 +00:00
26674d9fa1 bash completion for docker service {create,update} --registry-auth
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 2364392ded
Component: cli
2017-06-02 00:07:50 +00:00
1faecfc45b bash completion for default port on docker swarm {init,join}
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 2082c976e8
Component: cli
2017-06-02 00:07:49 +00:00
a3109e1623 bash completion can be configured to show node and service IDs
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 14f578eb92
Component: cli
2017-06-02 00:07:49 +00:00
a0a4ff54be bash completion for docker {service,node} filters
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: e417618387
Component: cli
2017-06-02 00:07:49 +00:00
ad92fbb392 Use "on-failure" for both containers and services
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: de7c6a8355
Component: cli
2017-06-02 00:07:49 +00:00
1eabd2ce29 Add bash completion for docker ps --last
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: ec37a0b192
Component: cli
2017-06-02 00:07:48 +00:00
abc7ff0935 bash completion enhancements for docker {swarm,node,service}
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 29be1f50a8
Component: cli
2017-06-02 00:07:47 +00:00
ff6579771a bash completion for -c alias to --cpu-shares
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 6440bac134
Component: cli
2017-06-02 00:07:46 +00:00
109a5706ac bash completion for docker daemon --storage-opt btrfs.min_space
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 6f3d828938
Component: cli
2017-06-02 00:07:46 +00:00
957417db6e bash completion for docker {run,create} --storage-opt
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 789cd4c65f
Component: cli
2017-06-02 00:07:46 +00:00
f20586b7a2 bash completion for load and save image events
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 1ffefe059f
Component: cli
2017-06-02 00:07:46 +00:00
97a0906af9 bash completion for docker daemon --storage-driver olverlay2
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 884c0bab27
Component: cli
2017-06-02 00:07:46 +00:00
405f0797de bash completion for docker {run,create,network connect} --link-local-ip
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: ef5f8ec503
Component: cli
2017-06-02 00:07:46 +00:00
d579c11d35 fix bash completion for docker {swarm,node} subcommands
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: ab24ffa000
Component: cli
2017-06-02 00:07:45 +00:00
c173ea89a5 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>
Upstream-commit: 53e1898a90
Component: cli
2017-06-02 00:07:45 +00:00
e1cff7efc8 Add bash completion for docker service scale
Signed-off-by: Mike Goelzer <mike.goelzer@docker.com>

Conflicts:
	contrib/completion/bash/docker
Upstream-commit: ec3864b028
Component: cli
2017-06-02 00:07:45 +00:00
d2844bb5d6 fix bash completion for docker service subcommands
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 603002a3ec
Component: cli
2017-06-02 00:07:45 +00:00
b1ce0d7bfe bash completion for docker swarm update --cert-expiry
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 6cc83d80e0
Component: cli
2017-06-02 00:07:44 +00:00
8ba9627310 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>
Upstream-commit: 96150d3faa
Component: cli
2017-06-02 00:07:44 +00:00
17421ce296 Update bash completion for Docker 1.12 CLI commands
Signed-off-by: Mike Goelzer <mike.goelzer@docker.com>
Upstream-commit: ec66559999
Component: cli
2017-06-02 00:07:44 +00:00
da0bbb443c Add bash completion support for --runtime and --add-runtime
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 5a9cc4cea8
Component: cli
2017-06-02 00:07:44 +00:00
5f376bfeba Add missing completion for --config-file
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 48ae78b9b7
Component: cli
2017-06-02 00:07:44 +00:00
6ccacc5748 bash completion for docker daemon --live-restore
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: b9997ebdee
Component: cli
2017-06-02 00:07:43 +00:00
7dc58a723a Fix syntax errors in bash-completion (Closes: #23483)
Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
Upstream-commit: d965f30a15
Component: cli
2017-06-02 00:07:43 +00:00
87d2e9ce6f bash completion for docker ps --filter network
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: a15b94e1bc
Component: cli
2017-06-02 00:07:42 +00:00
0da04bb059 fix bash completion for dockerd with path
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 83e27e1f93
Component: cli
2017-06-02 00:07:42 +00:00
be7f4808e1 bash completion for detach events
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 2657fae67d
Component: cli
2017-06-02 00:07:41 +00:00
2db559a3cd bash completion for docker run healthcheck options
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: e116088cb2
Component: cli
2017-06-02 00:07:41 +00:00
792bba49eb bash completion for docker search --limit
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: ae11c80580
Component: cli
2017-06-02 00:07:41 +00:00
d249416261 bash completion for dockerd
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 3417ef2b0c
Component: cli
2017-06-02 00:07:40 +00:00
01613a96f6 Add before and since filter to images
Add support for two now filter on the `images` command : `before` and
`since`. They work the same as the one on the `ps` command but for
images.

        $ docker images --filter before=myimage
        # display all images older than myimage
        $ docker images --filter since=myimage
        # display all images younger than myimage

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: aac0a3ee13
Component: cli
2017-06-02 00:07:40 +00:00
0aed609b4e bash completion for docker ps -f {before,since}
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: dd83546376
Component: cli
2017-06-02 00:07:40 +00:00
4b02458b0f bash completion for daemon events
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: b4242ed63b
Component: cli
2017-06-02 00:07:40 +00:00
5f272b899b Add a --filter option to docker search
The filtering is made server-side, and the following filters are
supported:

* is-official (boolean)
* is-automated (boolean)
* has-stars (integer)

Signed-off-by: Fabrizio Soppelsa <fsoppelsa@mirantis.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 52d265fff9
Component: cli
2017-06-02 00:07:39 +00:00
53b32800ef Add support for --pid=container:<id>
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Upstream-commit: 637048e176
Component: cli
2017-06-02 00:07:39 +00:00
5673931769 bash completion for docker logs --details
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 68e71057ed
Component: cli
2017-06-02 00:07:38 +00:00
9d62063902 bash completion for docker daemon --max-concurrent-{down,up}load
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: df62e269a1
Component: cli
2017-06-02 00:07:38 +00:00