Merge pull request #16807 from jfrazelle/rename-flag

change flag name to better follow the other flags that start with disable
This commit is contained in:
Jess Frazelle 2015-10-07 10:40:32 -07:00
Родитель 8cee301874 c559d8ebf7
Коммит a1c373197f
7 изменённых файлов: 23 добавлений и 22 удалений

Просмотреть файл

@ -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
"

Просмотреть файл

@ -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" \
@ -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)" \

Просмотреть файл

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

Просмотреть файл

@ -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
@ -500,7 +500,7 @@ 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

Просмотреть файл

@ -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) {
@ -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())
}
@ -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())
}

Просмотреть файл

@ -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**[=*[]*]]
@ -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*]]
@ -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
@ -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`

Просмотреть файл

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