Skip to content

Commit

Permalink
change flag name to better follow the other flags that start with dis…
Browse files Browse the repository at this point in the history
…able;

Signed-off-by: Jessica Frazelle <[email protected]>
  • Loading branch information
jessfraz committed Oct 7, 2015
1 parent c1c3475 commit c559d8e
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 22 deletions.
6 changes: 3 additions & 3 deletions contrib/completion/bash/docker
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
# You can tailor completion for the "events", "history", "inspect", "run",
# "rmi" and "save" commands by settings the following environment
# variables:
#
#
# DOCKER_COMPLETION_SHOW_IMAGE_IDS
# "none" - Show names only (default)
# "non-intermediate" - Show names and ids, but omit intermediate image IDs
# "all" - Show names and ids, including intermediate image IDs
#
#
# DOCKER_COMPLETION_SHOW_TAGS
# "yes" - include tags in completion options (default)
# "no" - don't include tags in completion options
Expand Down Expand Up @@ -520,13 +520,13 @@ _docker_create() {
_docker_daemon() {
local boolean_options="
$global_boolean_options
--disable-legacy-registry
--help
--icc=false
--ip-forward=false
--ip-masq=false
--iptables=false
--ipv6
--no-legacy-registry
--selinux-enabled
--userland-proxy=false
"
Expand Down
2 changes: 1 addition & 1 deletion contrib/completion/zsh/_docker
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ __docker_subcommand() {
"($help)*--dns-search=-[DNS search domains to use]:DNS search: " \
"($help)*--dns-opt=-[DNS options to use]:DNS option: " \
"($help)*--default-ulimit=-[Set default ulimit settings for containers]:ulimit: " \
"($help)--disable-legacy-registry[Do not contact legacy registries]" \
"($help -e --exec-driver)"{-e,--exec-driver=-}"[Exec driver to use]:driver:(native lxc windows)" \
"($help)*--exec-opt=-[Set exec driver options]:exec driver options: " \
"($help)--exec-root=-[Root of the Docker execdriver]:path:_directories" \
Expand All @@ -452,7 +453,6 @@ __docker_subcommand() {
"($help)--log-driver=-[Default driver for container logs]:Logging driver:(json-file syslog journald gelf fluentd awslogs none)" \
"($help)*--log-opt=-[Log driver specific options]:log driver options: " \
"($help)--mtu=-[Set the containers network MTU]:mtu:(0 576 1420 1500 9000)" \
"($help)--no-legacy-registry[Do not contact legacy registries]" \
"($help -p --pidfile)"{-p,--pidfile=-}"[Path to use for daemon PID file]:PID file:_files" \
"($help)*--registry-mirror=-[Preferred Docker registry mirror]:registry mirror: " \
"($help -s --storage-driver)"{-s,--storage-driver=-}"[Storage driver to use]:driver:(aufs devicemapper btrfs zfs overlay)" \
Expand Down
2 changes: 1 addition & 1 deletion docs/misc/deprecated.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,6 @@ the path does not exist.

### Interacting with V1 registries

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.
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.


16 changes: 8 additions & 8 deletions docs/reference/commandline/daemon.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ weight=1
--log-driver="json-file" Default driver for container logs
--log-opt=[] Log driver specific options
--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
--registry-mirror=[] Preferred Docker registry mirror
-s, --storage-driver="" Storage driver to use
Expand Down Expand Up @@ -187,7 +187,7 @@ options for `zfs` start with `zfs`.

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 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
method of having Docker utilize device mapper thin provisioning as the
Expand All @@ -198,7 +198,7 @@ options for `zfs` start with `zfs`.

As a fallback if no thin pool is provided, loopback files will be
created. Loopback is very slow, but can be used without any
pre-configuration of storage. It is strongly recommended that you do
pre-configuration of storage. It is strongly recommended that you do
not use loopback in production. Ensure your Docker daemon has a
`--storage-opt dm.thinpooldev` argument provided.

Expand Down Expand Up @@ -229,7 +229,7 @@ options for `zfs` start with `zfs`.
* `dm.loopdatasize`

>**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
"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
Expand Down Expand Up @@ -453,14 +453,14 @@ automatically marked as insecure as of Docker 1.3.2. It is not recommended to
rely on this, as it may change in the future.

Enabling `--insecure-registry`, i.e., allowing un-encrypted and/or untrusted
communication, can be useful when running a local registry. However,
communication, can be 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
testing purposes. For increased security, users should add their CA to their
system's list of trusted CAs instead of enabling `--insecure-registry`.

## Legacy Registries

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.
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.

## Running a Docker daemon behind a HTTPS_PROXY

Expand All @@ -484,7 +484,7 @@ use the proxy
`--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
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.

Be careful setting `nproc` with the `ulimit` flag as `nproc` is designed by Linux to
Expand Down
7 changes: 4 additions & 3 deletions integration-cli/docker_cli_v2_only.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package main

import (
"fmt"
"github.com/go-check/check"
"io/ioutil"
"net/http"
"os"

"github.com/go-check/check"
)

func makefile(contents string) (string, func(), error) {
Expand Down Expand Up @@ -50,7 +51,7 @@ func (s *DockerRegistrySuite) TestV2Only(c *check.C) {

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 {
c.Fatalf("Error starting daemon: %s", err.Error())
}
Expand Down Expand Up @@ -105,7 +106,7 @@ func (s *DockerRegistrySuite) TestV1(c *check.C) {
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 {
c.Fatalf("Error starting daemon: %s", err.Error())
}
Expand Down
10 changes: 5 additions & 5 deletions man/docker-daemon.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ docker-daemon - Enable daemon mode
[**--default-gateway**[=*DEFAULT-GATEWAY*]]
[**--default-gateway-v6**[=*DEFAULT-GATEWAY-V6*]]
[**--default-ulimit**[=*[]*]]
[**--disable-legacy-registry**[=*false*]]
[**--dns**[=*[]*]]
[**--dns-opt**[=*[]*]]
[**--dns-search**[=*[]*]]
Expand All @@ -37,7 +38,6 @@ docker-daemon - Enable daemon mode
[**--log-driver**[=*json-file*]]
[**--log-opt**[=*map[]*]]
[**--mtu**[=*0*]]
[**--no-legacy-registry**[=*false*]]
[**-p**|**--pidfile**[=*/var/run/docker.pid*]]
[**--registry-mirror**[=*[]*]]
[**-s**|**--storage-driver**[=*STORAGE-DRIVER*]]
Expand Down Expand Up @@ -86,6 +86,9 @@ format.
**--default-ulimit**=[]
Set default ulimits for containers.

**--disable-legacy-registry**=*true*|*false*
Do not contact legacy registries

**--dns**=""
Force Docker to use specific DNS servers

Expand Down Expand Up @@ -133,7 +136,7 @@ unix://[/path/to/socket] to use.

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.

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`.
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`.

**--ip**=""
Default IP address to use when binding container ports. Default is `0.0.0.0`.
Expand Down Expand Up @@ -168,9 +171,6 @@ unix://[/path/to/socket] to use.
**--mtu**=VALUE
Set the containers network mtu. Default is `0`.

**--no-legacy-registry**=*true*|*false*
Do not contact legacy registries

**-p**, **--pidfile**=""
Path to use for daemon PID file. Default is `/var/run/docker.pid`

Expand Down
2 changes: 1 addition & 1 deletion registry/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (options *Options) InstallFlags(cmd *flag.FlagSet, usageFn func(string) str
cmd.Var(&options.Mirrors, []string{"-registry-mirror"}, usageFn("Preferred Docker registry mirror"))
options.InsecureRegistries = opts.NewListOpts(ValidateIndexName)
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
Expand Down

0 comments on commit c559d8e

Please sign in to comment.