Pārlūkot izejas kodu

change flag name to better follow the other flags that start with disable;

Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Jessica Frazelle 9 gadi atpakaļ
vecāks
revīzija
1321794dc1

+ 1 - 0
contrib/completion/bash/docker

@@ -462,6 +462,7 @@ _docker_create() {
 _docker_daemon() {
 _docker_daemon() {
 	local boolean_options="
 	local boolean_options="
 		$global_boolean_options
 		$global_boolean_options
+		--disable-legacy-registry
 		--help
 		--help
 		--icc=false
 		--icc=false
 		--ip-forward=false
 		--ip-forward=false

+ 1 - 0
contrib/completion/zsh/_docker

@@ -597,6 +597,7 @@ _docker() {
         "($help -d --daeamon)"{-d,--daemon}"[Enable daemon mode]" \
         "($help -d --daeamon)"{-d,--daemon}"[Enable daemon mode]" \
         "($help)--default-gateway[Container default gateway IPv4 address]:IPv4 address: " \
         "($help)--default-gateway[Container default gateway IPv4 address]:IPv4 address: " \
         "($help)--default-gateway-v6[Container default gateway IPv6 address]:IPv6 address: " \
         "($help)--default-gateway-v6[Container default gateway IPv6 address]:IPv6 address: " \
+        "($help)--disable-legacy-registry[Do not contact legacy registries]" \
         "($help)*--dns=-[DNS server to use]:DNS: " \
         "($help)*--dns=-[DNS server to use]:DNS: " \
         "($help)*--dns-search=-[DNS search domains to use]" \
         "($help)*--dns-search=-[DNS search domains to use]" \
         "($help)*--default-ulimit=-[Set default ulimit settings for containers]:ulimit: " \
         "($help)*--default-ulimit=-[Set default ulimit settings for containers]:ulimit: " \

+ 3 - 3
docs/misc/deprecated.md

@@ -18,7 +18,7 @@ The following list of features are deprecated.
 **Target For Removal In Release: v1.10**
 **Target For Removal In Release: v1.10**
 
 
 The built-in LXC execution driver is deprecated for an external implementation.
 The built-in LXC execution driver is deprecated for an external implementation.
-The lxc-conf flag and API fields will also be removed. 
+The lxc-conf flag and API fields will also be removed.
 
 
 ### Old Command Line Options
 ### Old Command Line Options
 **Deprecated In Release: [v1.8.0](/release-notes/#docker-engine-1-8-0)**
 **Deprecated In Release: [v1.8.0](/release-notes/#docker-engine-1-8-0)**
@@ -29,7 +29,7 @@ The flags `-d` and `--daemon` are deprecated in favor of the `daemon` subcommand
 
 
     docker daemon -H ...
     docker daemon -H ...
 
 
-The following single-dash (`-opt`) variant of certain command line options 
+The following single-dash (`-opt`) variant of certain command line options
 are deprecated and replaced with double-dash options (`--opt`):
 are deprecated and replaced with double-dash options (`--opt`):
 
 
     docker attach -nostdin
     docker attach -nostdin
@@ -71,4 +71,4 @@ The following double-dash options are deprecated and have no replacement:
 
 
 ### Interacting with V1 registries
 ### Interacting with V1 registries
 
 
-Version 1.8.3 adds a flag (`--no-legacy-registry=false`) which prevents the docker daemon from `pull`, `push`, and `login` operations against v1 registries.  Though disabled by default, this signals the intent to deprecate the v1 protocol.
+Version 1.8.3 adds a flag (`--disable-legacy-registry=false`) which prevents the docker daemon from `pull`, `push`, and `login` operations against v1 registries.  Though disabled by default, this signals the intent to deprecate the v1 protocol.

+ 5 - 5
docs/reference/commandline/daemon.md

@@ -45,7 +45,7 @@ parent = "smn_cli"
       --log-driver="json-file"               Default driver for container logs
       --log-driver="json-file"               Default driver for container logs
       --log-opt=[]                           Log driver specific options
       --log-opt=[]                           Log driver specific options
       --mtu=0                                Set the containers network MTU
       --mtu=0                                Set the containers network MTU
-      --no-legacy-registry=false             Do not contact legacy registries
+      --disable-legacy-registry=false        Do not contact legacy registries
       -p, --pidfile="/var/run/docker.pid"    Path to use for daemon PID file
       -p, --pidfile="/var/run/docker.pid"    Path to use for daemon PID file
       --registry-mirror=[]                   Preferred Docker registry mirror
       --registry-mirror=[]                   Preferred Docker registry mirror
       -s, --storage-driver=""                Storage driver to use
       -s, --storage-driver=""                Storage driver to use
@@ -183,7 +183,7 @@ options for `zfs` start with `zfs`.
 
 
      If using a block device for device mapper storage, it is best to use `lvm`
      If using a block device for device mapper storage, it is best to use `lvm`
      to create and manage the thin-pool volume. This volume is then handed to Docker
      to create and manage the thin-pool volume. This volume is then handed to Docker
-     to exclusively create snapshot volumes needed for images and containers.  
+     to exclusively create snapshot volumes needed for images and containers.
 
 
      Managing the thin-pool outside of Docker makes for the most feature-rich
      Managing the thin-pool outside of Docker makes for the most feature-rich
      method of having Docker utilize device mapper thin provisioning as the
      method of having Docker utilize device mapper thin provisioning as the
@@ -219,7 +219,7 @@ options for `zfs` start with `zfs`.
  *  `dm.loopdatasize`
  *  `dm.loopdatasize`
 
 
     >**Note**: This option configures devicemapper loopback, which should not be used in production.
     >**Note**: This option configures devicemapper loopback, which should not be used in production.
-		
+
     Specifies the size to use when creating the loopback file for the
     Specifies the size to use when creating the loopback file for the
     "data" device which is used for the thin pool. The default size is
     "data" device which is used for the thin pool. The default size is
     100G. The file is sparse, so it will not initially take up this
     100G. The file is sparse, so it will not initially take up this
@@ -447,7 +447,7 @@ rely on this, as it may change in the future.
 
 
 ## Legacy Registries
 ## Legacy Registries
 
 
-Enabling `--no-legacy-registry` forces a docker daemon to only interact with
+Enabling `--disable-legacy-registry` forces a docker daemon to only interact with
 registries which support the V2 protocol.  Specifically, the daemon will not
 registries which support the V2 protocol.  Specifically, the daemon will not
 attempt `push`, `pull` and `login` to v1 registries.  The exception to this
 attempt `push`, `pull` and `login` to v1 registries.  The exception to this
 is `search` which can still be performed on v1 registries.
 is `search` which can still be performed on v1 registries.
@@ -474,7 +474,7 @@ use the proxy
 `--default-ulimit` allows you to set the default `ulimit` options to use for
 `--default-ulimit` allows you to set the default `ulimit` options to use for
 all containers. It takes the same options as `--ulimit` for `docker run`. If
 all containers. It takes the same options as `--ulimit` for `docker run`. If
 these defaults are not set, `ulimit` settings will be inherited, if not set on
 these defaults are not set, `ulimit` settings will be inherited, if not set on
-`docker run`, from the Docker daemon. Any `--ulimit` options passed to 
+`docker run`, from the Docker daemon. Any `--ulimit` options passed to
 `docker run` will overwrite these defaults.
 `docker run` will overwrite these defaults.
 
 
 Be careful setting `nproc` with the `ulimit` flag as `nproc` is designed by Linux to
 Be careful setting `nproc` with the `ulimit` flag as `nproc` is designed by Linux to

+ 4 - 3
integration-cli/docker_cli_v2_only.go

@@ -2,10 +2,11 @@ package main
 
 
 import (
 import (
 	"fmt"
 	"fmt"
-	"github.com/go-check/check"
 	"io/ioutil"
 	"io/ioutil"
 	"net/http"
 	"net/http"
 	"os"
 	"os"
+
+	"github.com/go-check/check"
 )
 )
 
 
 func makefile(contents string) (string, func(), error) {
 func makefile(contents string) (string, func(), error) {
@@ -50,7 +51,7 @@ func (s *DockerRegistrySuite) TestV2Only(c *check.C) {
 
 
 	repoName := fmt.Sprintf("%s/busybox", reg.hostport)
 	repoName := fmt.Sprintf("%s/busybox", reg.hostport)
 
 
-	err = s.d.Start("--insecure-registry", reg.hostport, "--no-legacy-registry=true")
+	err = s.d.Start("--insecure-registry", reg.hostport, "--disable-legacy-registry=true")
 	if err != nil {
 	if err != nil {
 		c.Fatalf("Error starting daemon: %s", err.Error())
 		c.Fatalf("Error starting daemon: %s", err.Error())
 	}
 	}
@@ -105,7 +106,7 @@ func (s *DockerRegistrySuite) TestV1(c *check.C) {
 		v1Repo++
 		v1Repo++
 	})
 	})
 
 
-	err = s.d.Start("--insecure-registry", reg.hostport, "--no-legacy-registry=false")
+	err = s.d.Start("--insecure-registry", reg.hostport, "--disable-legacy-registry=false")
 	if err != nil {
 	if err != nil {
 		c.Fatalf("Error starting daemon: %s", err.Error())
 		c.Fatalf("Error starting daemon: %s", err.Error())
 	}
 	}

+ 7 - 7
man/docker.1.md

@@ -53,6 +53,9 @@ To see the man page for a command run **man docker <command>**.
 **--default-ulimit**=[]
 **--default-ulimit**=[]
   Set default ulimits for containers.
   Set default ulimits for containers.
 
 
+**--disable-legacy-registry=**true|false
+  Do not contact legacy registries
+
 **--dns**=""
 **--dns**=""
   Force Docker to use specific DNS servers
   Force Docker to use specific DNS servers
 
 
@@ -125,9 +128,6 @@ unix://[/path/to/socket] to use.
 **--mtu**=VALUE
 **--mtu**=VALUE
   Set the containers network mtu. Default is `0`.
   Set the containers network mtu. Default is `0`.
 
 
-**--no-legacy-registry=**true|false
-  Do not contact legacy registries
-
 **-p**, **--pidfile**=""
 **-p**, **--pidfile**=""
   Path to use for daemon PID file. Default is `/var/run/docker.pid`
   Path to use for daemon PID file. Default is `/var/run/docker.pid`
 
 
@@ -371,7 +371,7 @@ the size of images and containers. The default value is 100G. Note,
 thin devices are inherently "sparse", so a 100G device which is mostly
 thin devices are inherently "sparse", so a 100G device which is mostly
 empty doesn't use 100 GB of space on the pool. However, the filesystem
 empty doesn't use 100 GB of space on the pool. However, the filesystem
 will use more space for base images the larger the device
 will use more space for base images the larger the device
-is. 
+is.
 
 
 This value affects the system-wide "base" empty filesystem that may already
 This value affects the system-wide "base" empty filesystem that may already
 be initialized and inherited by pulled images. Typically, a change to this
 be initialized and inherited by pulled images. Typically, a change to this
@@ -522,12 +522,12 @@ daemon with a supported environment.
 
 
 Use the **--exec-opt** flags to specify options to the exec-driver. The only
 Use the **--exec-opt** flags to specify options to the exec-driver. The only
 driver that accepts this flag is the *native* (libcontainer) driver. As a
 driver that accepts this flag is the *native* (libcontainer) driver. As a
-result, you must also specify **-s=**native for this option to have effect. The 
+result, you must also specify **-s=**native for this option to have effect. The
 following is the only *native* option:
 following is the only *native* option:
 
 
 #### native.cgroupdriver
 #### native.cgroupdriver
-Specifies the management of the container's `cgroups`. You can specify 
-`cgroupfs` or `systemd`. If you specify `systemd` and it is not available, the 
+Specifies the management of the container's `cgroups`. You can specify
+`cgroupfs` or `systemd`. If you specify `systemd` and it is not available, the
 system uses `cgroupfs`.
 system uses `cgroupfs`.
 
 
 #### Client
 #### Client

+ 1 - 1
registry/config.go

@@ -61,7 +61,7 @@ func (options *Options) InstallFlags(cmd *flag.FlagSet, usageFn func(string) str
 	cmd.Var(&options.Mirrors, []string{"-registry-mirror"}, usageFn("Preferred Docker registry mirror"))
 	cmd.Var(&options.Mirrors, []string{"-registry-mirror"}, usageFn("Preferred Docker registry mirror"))
 	options.InsecureRegistries = opts.NewListOpts(ValidateIndexName)
 	options.InsecureRegistries = opts.NewListOpts(ValidateIndexName)
 	cmd.Var(&options.InsecureRegistries, []string{"-insecure-registry"}, usageFn("Enable insecure registry communication"))
 	cmd.Var(&options.InsecureRegistries, []string{"-insecure-registry"}, usageFn("Enable insecure registry communication"))
-	cmd.BoolVar(&V2Only, []string{"-no-legacy-registry"}, false, "Do not contact legacy registries")
+	cmd.BoolVar(&V2Only, []string{"-disable-legacy-registry"}, false, "Do not contact legacy registries")
 }
 }
 
 
 type netIPNet net.IPNet
 type netIPNet net.IPNet