Browse code

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

Signed-off-by: Jessica Frazelle <acidburn@docker.com>

Jessica Frazelle authored on 2015/10/07 07:45:32
Showing 7 changed files
... ...
@@ -20,12 +20,12 @@
20 20
 # You can tailor completion for the "events", "history", "inspect", "run",
21 21
 # "rmi" and "save" commands by settings the following environment
22 22
 # variables:
23
-#   
23
+#
24 24
 # DOCKER_COMPLETION_SHOW_IMAGE_IDS
25 25
 #   "none" - Show names only (default)
26 26
 #   "non-intermediate" - Show names and ids, but omit intermediate image IDs
27 27
 #   "all" - Show names and ids, including intermediate image IDs
28
-# 
28
+#
29 29
 # DOCKER_COMPLETION_SHOW_TAGS
30 30
 #   "yes" - include tags in completion options (default)
31 31
 #   "no"  - don't include tags in completion options
... ...
@@ -520,13 +520,13 @@ _docker_create() {
520 520
 _docker_daemon() {
521 521
 	local boolean_options="
522 522
 		$global_boolean_options
523
+		--disable-legacy-registry
523 524
 		--help
524 525
 		--icc=false
525 526
 		--ip-forward=false
526 527
 		--ip-masq=false
527 528
 		--iptables=false
528 529
 		--ipv6
529
-		--no-legacy-registry
530 530
 		--selinux-enabled
531 531
 		--userland-proxy=false
532 532
 	"
... ...
@@ -432,6 +432,7 @@ __docker_subcommand() {
432 432
                 "($help)*--dns-search=-[DNS search domains to use]:DNS search: " \
433 433
                 "($help)*--dns-opt=-[DNS options to use]:DNS option: " \
434 434
                 "($help)*--default-ulimit=-[Set default ulimit settings for containers]:ulimit: " \
435
+                "($help)--disable-legacy-registry[Do not contact legacy registries]" \
435 436
                 "($help -e --exec-driver)"{-e,--exec-driver=-}"[Exec driver to use]:driver:(native lxc windows)" \
436 437
                 "($help)*--exec-opt=-[Set exec driver options]:exec driver options: " \
437 438
                 "($help)--exec-root=-[Root of the Docker execdriver]:path:_directories" \
... ...
@@ -452,7 +453,6 @@ __docker_subcommand() {
452 452
                 "($help)--log-driver=-[Default driver for container logs]:Logging driver:(json-file syslog journald gelf fluentd awslogs none)" \
453 453
                 "($help)*--log-opt=-[Log driver specific options]:log driver options: " \
454 454
                 "($help)--mtu=-[Set the containers network MTU]:mtu:(0 576 1420 1500 9000)" \
455
-                "($help)--no-legacy-registry[Do not contact legacy registries]" \
456 455
                 "($help -p --pidfile)"{-p,--pidfile=-}"[Path to use for daemon PID file]:PID file:_files" \
457 456
                 "($help)*--registry-mirror=-[Preferred Docker registry mirror]:registry mirror: " \
458 457
                 "($help -s --storage-driver)"{-s,--storage-driver=-}"[Storage driver to use]:driver:(aufs devicemapper btrfs zfs overlay)" \
... ...
@@ -103,6 +103,6 @@ the path does not exist.
103 103
 
104 104
 ### Interacting with V1 registries
105 105
 
106
-Version 1.9 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.
106
+Version 1.9 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.
107 107
 
108 108
 
... ...
@@ -49,7 +49,7 @@ weight=1
49 49
       --log-driver="json-file"               Default driver for container logs
50 50
       --log-opt=[]                           Log driver specific options
51 51
       --mtu=0                                Set the containers network MTU
52
-      --no-legacy-registry=false             Do not contact legacy registries
52
+      --disable-legacy-registry=false        Do not contact legacy registries
53 53
       -p, --pidfile="/var/run/docker.pid"    Path to use for daemon PID file
54 54
       --registry-mirror=[]                   Preferred Docker registry mirror
55 55
       -s, --storage-driver=""                Storage driver to use
... ...
@@ -187,7 +187,7 @@ options for `zfs` start with `zfs`.
187 187
 
188 188
      If using a block device for device mapper storage, it is best to use `lvm`
189 189
      to create and manage the thin-pool volume. This volume is then handed to Docker
190
-     to exclusively create snapshot volumes needed for images and containers.  
190
+     to exclusively create snapshot volumes needed for images and containers.
191 191
 
192 192
      Managing the thin-pool outside of Docker makes for the most feature-rich
193 193
      method of having Docker utilize device mapper thin provisioning as the
... ...
@@ -198,7 +198,7 @@ options for `zfs` start with `zfs`.
198 198
 
199 199
      As a fallback if no thin pool is provided, loopback files will be
200 200
      created. Loopback is very slow, but can be used without any
201
-     pre-configuration of storage. It is strongly recommended that you do 
201
+     pre-configuration of storage. It is strongly recommended that you do
202 202
      not use loopback in production. Ensure your Docker daemon has a
203 203
      `--storage-opt dm.thinpooldev` argument provided.
204 204
 
... ...
@@ -229,7 +229,7 @@ options for `zfs` start with `zfs`.
229 229
  *  `dm.loopdatasize`
230 230
 
231 231
     >**Note**: This option configures devicemapper loopback, which should not be used in production.
232
-		
232
+
233 233
     Specifies the size to use when creating the loopback file for the
234 234
     "data" device which is used for the thin pool. The default size is
235 235
     100G. The file is sparse, so it will not initially take up this
... ...
@@ -453,14 +453,14 @@ automatically marked as insecure as of Docker 1.3.2. It is not recommended to
453 453
 rely on this, as it may change in the future.
454 454
 
455 455
 Enabling `--insecure-registry`, i.e., allowing un-encrypted and/or untrusted
456
-communication, can be useful when running a local registry.  However, 
456
+communication, can be useful when running a local registry.  However,
457 457
 because its use creates security vulnerabilities it should ONLY be enabled for
458
-testing purposes.  For increased security, users should add their CA to their 
458
+testing purposes.  For increased security, users should add their CA to their
459 459
 system's list of trusted CAs instead of enabling `--insecure-registry`.
460 460
 
461 461
 ## Legacy Registries
462 462
 
463
-Enabling `--no-legacy-registry` forces a docker daemon to only interact with registries which support the V2 protocol.  Specifically, the daemon will not attempt `push`, `pull` and `login` to v1 registries.  The exception to this is `search` which can still be performed on v1 registries.
463
+Enabling `--disable-legacy-registry` forces a docker daemon to only interact with registries which support the V2 protocol.  Specifically, the daemon will not attempt `push`, `pull` and `login` to v1 registries.  The exception to this is `search` which can still be performed on v1 registries.
464 464
 
465 465
 ## Running a Docker daemon behind a HTTPS_PROXY
466 466
 
... ...
@@ -484,7 +484,7 @@ use the proxy
484 484
 `--default-ulimit` allows you to set the default `ulimit` options to use for
485 485
 all containers. It takes the same options as `--ulimit` for `docker run`. If
486 486
 these defaults are not set, `ulimit` settings will be inherited, if not set on
487
-`docker run`, from the Docker daemon. Any `--ulimit` options passed to 
487
+`docker run`, from the Docker daemon. Any `--ulimit` options passed to
488 488
 `docker run` will overwrite these defaults.
489 489
 
490 490
 Be careful setting `nproc` with the `ulimit` flag as `nproc` is designed by Linux to
... ...
@@ -2,10 +2,11 @@ package main
2 2
 
3 3
 import (
4 4
 	"fmt"
5
-	"github.com/go-check/check"
6 5
 	"io/ioutil"
7 6
 	"net/http"
8 7
 	"os"
8
+
9
+	"github.com/go-check/check"
9 10
 )
10 11
 
11 12
 func makefile(contents string) (string, func(), error) {
... ...
@@ -50,7 +51,7 @@ func (s *DockerRegistrySuite) TestV2Only(c *check.C) {
50 50
 
51 51
 	repoName := fmt.Sprintf("%s/busybox", reg.hostport)
52 52
 
53
-	err = s.d.Start("--insecure-registry", reg.hostport, "--no-legacy-registry=true")
53
+	err = s.d.Start("--insecure-registry", reg.hostport, "--disable-legacy-registry=true")
54 54
 	if err != nil {
55 55
 		c.Fatalf("Error starting daemon: %s", err.Error())
56 56
 	}
... ...
@@ -105,7 +106,7 @@ func (s *DockerRegistrySuite) TestV1(c *check.C) {
105 105
 		v1Repo++
106 106
 	})
107 107
 
108
-	err = s.d.Start("--insecure-registry", reg.hostport, "--no-legacy-registry=false")
108
+	err = s.d.Start("--insecure-registry", reg.hostport, "--disable-legacy-registry=false")
109 109
 	if err != nil {
110 110
 		c.Fatalf("Error starting daemon: %s", err.Error())
111 111
 	}
... ...
@@ -13,6 +13,7 @@ docker-daemon - Enable daemon mode
13 13
 [**--default-gateway**[=*DEFAULT-GATEWAY*]]
14 14
 [**--default-gateway-v6**[=*DEFAULT-GATEWAY-V6*]]
15 15
 [**--default-ulimit**[=*[]*]]
16
+[**--disable-legacy-registry**[=*false*]]
16 17
 [**--dns**[=*[]*]]
17 18
 [**--dns-opt**[=*[]*]]
18 19
 [**--dns-search**[=*[]*]]
... ...
@@ -37,7 +38,6 @@ docker-daemon - Enable daemon mode
37 37
 [**--log-driver**[=*json-file*]]
38 38
 [**--log-opt**[=*map[]*]]
39 39
 [**--mtu**[=*0*]]
40
-[**--no-legacy-registry**[=*false*]]
41 40
 [**-p**|**--pidfile**[=*/var/run/docker.pid*]]
42 41
 [**--registry-mirror**[=*[]*]]
43 42
 [**-s**|**--storage-driver**[=*STORAGE-DRIVER*]]
... ...
@@ -86,6 +86,9 @@ format.
86 86
 **--default-ulimit**=[]
87 87
   Set default ulimits for containers.
88 88
 
89
+**--disable-legacy-registry**=*true*|*false*
90
+  Do not contact legacy registries
91
+
89 92
 **--dns**=""
90 93
   Force Docker to use specific DNS servers
91 94
 
... ...
@@ -133,7 +136,7 @@ unix://[/path/to/socket] to use.
133 133
 
134 134
   List of insecure registries can contain an element with CIDR notation to specify a whole subnet. Insecure registries accept HTTP and/or accept HTTPS with certificates from unknown CAs.
135 135
 
136
-  Enabling `--insecure-registry` is useful when running a local registry.  However, because its use creates security vulnerabilities it should ONLY be enabled for testing purposes.  For increased security, users should add their CA to their system's list of trusted CAs instead of using `--insecure-registry`. 
136
+  Enabling `--insecure-registry` is useful when running a local registry.  However, because its use creates security vulnerabilities it should ONLY be enabled for testing purposes.  For increased security, users should add their CA to their system's list of trusted CAs instead of using `--insecure-registry`.
137 137
 
138 138
 **--ip**=""
139 139
   Default IP address to use when binding container ports. Default is `0.0.0.0`.
... ...
@@ -168,9 +171,6 @@ unix://[/path/to/socket] to use.
168 168
 **--mtu**=VALUE
169 169
   Set the containers network mtu. Default is `0`.
170 170
 
171
-**--no-legacy-registry**=*true*|*false*
172
-  Do not contact legacy registries
173
-
174 171
 **-p**, **--pidfile**=""
175 172
   Path to use for daemon PID file. Default is `/var/run/docker.pid`
176 173
 
... ...
@@ -57,7 +57,7 @@ func (options *Options) InstallFlags(cmd *flag.FlagSet, usageFn func(string) str
57 57
 	cmd.Var(&options.Mirrors, []string{"-registry-mirror"}, usageFn("Preferred Docker registry mirror"))
58 58
 	options.InsecureRegistries = opts.NewListOpts(ValidateIndexName)
59 59
 	cmd.Var(&options.InsecureRegistries, []string{"-insecure-registry"}, usageFn("Enable insecure registry communication"))
60
-	cmd.BoolVar(&V2Only, []string{"-no-legacy-registry"}, false, "Do not contact legacy registries")
60
+	cmd.BoolVar(&V2Only, []string{"-disable-legacy-registry"}, false, "Do not contact legacy registries")
61 61
 }
62 62
 
63 63
 type netIPNet net.IPNet