Add flag --host
to service create
and --host-add/--host-rm
to service update
This fix tries to address 27902 by adding a flag `--host` to `docker service create` and `--host-add/--host-rm` to `docker service update`, so that it is possible to specify extra `host:ip` settings in `/etc/hosts`. This fix adds `Hosts` in swarmkit's `ContainerSpec` so that it is possible to specify extra hosts during service creation. Related docs has been updated. An integration test has been added. This fix fixes 27902. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
parent
2d85970a8c
commit
9cda7c331e
@ -35,6 +35,7 @@ Options:
|
|||||||
--health-retries int Consecutive failures needed to report unhealthy
|
--health-retries int Consecutive failures needed to report unhealthy
|
||||||
--health-timeout duration Maximum time to allow one check to run (default none)
|
--health-timeout duration Maximum time to allow one check to run (default none)
|
||||||
--help Print usage
|
--help Print usage
|
||||||
|
--host list Set one or more custom host-to-IP mappings (host:ip) (default [])
|
||||||
--hostname string Container hostname
|
--hostname string Container hostname
|
||||||
-l, --label list Service labels (default [])
|
-l, --label list Service labels (default [])
|
||||||
--limit-cpu decimal Limit CPUs (default 0.000)
|
--limit-cpu decimal Limit CPUs (default 0.000)
|
||||||
|
@ -43,6 +43,8 @@ Options:
|
|||||||
--health-retries int Consecutive failures needed to report unhealthy
|
--health-retries int Consecutive failures needed to report unhealthy
|
||||||
--health-timeout duration Maximum time to allow one check to run (default none)
|
--health-timeout duration Maximum time to allow one check to run (default none)
|
||||||
--help Print usage
|
--help Print usage
|
||||||
|
--host-add list Add or update a custom host-to-IP mapping (host:ip) (default [])
|
||||||
|
--host-rm list Remove a custom host-to-IP mapping (host:ip) (default [])
|
||||||
--image string Service image tag
|
--image string Service image tag
|
||||||
--label-add list Add or update a service label (default [])
|
--label-add list Add or update a service label (default [])
|
||||||
--label-rm list Remove a label by its key (default [])
|
--label-rm list Remove a label by its key (default [])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user