From 79b19cba1657f7c4a8870870d2547476bbd11d7c Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sat, 28 Oct 2017 16:47:53 +0200 Subject: [PATCH] Fix flag description for --host-add The `--host-add` flag adds a new `host:ip` mapping. Even though adding an entry is idempotent (adding the same mapping multiple times does not update the service's definition), it does not _update_ an existing mapping with a new IP-address (multiple IP-addresses can be defined for a host). This patch removes the "or update" part from the flag's description. Signed-off-by: Sebastiaan van Stijn --- cli/command/service/update.go | 2 +- docs/reference/commandline/service_update.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/command/service/update.go b/cli/command/service/update.go index 6ee0dfc742..22a3d2f899 100644 --- a/cli/command/service/update.go +++ b/cli/command/service/update.go @@ -92,7 +92,7 @@ func newUpdateCommand(dockerCli command.Cli) *cobra.Command { flags.SetAnnotation(flagDNSOptionAdd, "version", []string{"1.25"}) flags.Var(&options.dnsSearch, flagDNSSearchAdd, "Add or update a custom DNS search domain") flags.SetAnnotation(flagDNSSearchAdd, "version", []string{"1.25"}) - flags.Var(&options.hosts, flagHostAdd, "Add or update a custom host-to-IP mapping (host:ip)") + flags.Var(&options.hosts, flagHostAdd, "Add a custom host-to-IP mapping (host:ip)") flags.SetAnnotation(flagHostAdd, "version", []string{"1.25"}) return cmd diff --git a/docs/reference/commandline/service_update.md b/docs/reference/commandline/service_update.md index f085e871de..7f27f84f4c 100644 --- a/docs/reference/commandline/service_update.md +++ b/docs/reference/commandline/service_update.md @@ -49,7 +49,7 @@ Options: --health-start-period duration Start period for the container to initialize before counting retries towards unstable (ms|s|m|h) --health-timeout duration Maximum time to allow one check to run (ms|s|m|h) --help Print usage - --host-add list Add or update a custom host-to-IP mapping (host:ip) + --host-add list Add a custom host-to-IP mapping (host:ip) --host-rm list Remove a custom host-to-IP mapping (host:ip) --hostname string Container hostname --image string Service image tag