From 375b17a312cfc838cef231fde6d55a0a819cfd03 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 13 Apr 2023 14:49:14 +0200 Subject: [PATCH] docker info: don't print "registry" (IndexServerAddress) The IndexServerAddress field was as part of the initial Windows implementation of the engine. For legal reasons, Microsoft Windows (and thus Docker images based on Windows) were not allowed to be distributed through non-Microsoft infrastructure. As a temporary solution, a dedicated "registry-win-tp3.docker.io" registry was created to serve Windows images. Currently, this field always shows "https://index.docker.io/v1/", which is confusing, because that address is not used for the registry (only for authentication and "v1" search). docker info ... Registry: https://index.docker.io/v1/ Starting with b4ca1c7368daeead400fcc1b8f2d61951a0d9d1e, this field is also no longer used during authentication, and a3d56e7d067b38b98548a864436880eef526f971 removed the (deprecated) ElectAuthServer() which was previously used to query it. Given that there's currently no practical use for this information, and it only adds "noise" (and confusion), this patch removes it from the default output. For now, the field is (still) available for those that want to use it; docker info --format '{{.IndexServerAddress}}' https://index.docker.io/v1/ But it won't be printed by default. Signed-off-by: Sebastiaan van Stijn --- cli/command/system/info.go | 1 - cli/command/system/testdata/docker-info-badsec.golden | 1 - cli/command/system/testdata/docker-info-no-swarm.golden | 1 - cli/command/system/testdata/docker-info-plugins.golden | 1 - .../system/testdata/docker-info-with-labels-empty.golden | 1 - cli/command/system/testdata/docker-info-with-labels-nil.golden | 1 - cli/command/system/testdata/docker-info-with-swarm.golden | 1 - docs/reference/commandline/info.md | 2 -- man/src/system/info.md | 1 - 9 files changed, 10 deletions(-) diff --git a/cli/command/system/info.go b/cli/command/system/info.go index 2e57bf421302..1d675c75f0fd 100644 --- a/cli/command/system/info.go +++ b/cli/command/system/info.go @@ -324,7 +324,6 @@ func prettyPrintServerInfo(dockerCli command.Cli, info types.Info) []error { if len(u) > 0 { fmt.Fprintln(dockerCli.Out(), " Username:", u) } - fmt.Fprintln(dockerCli.Out(), " Registry:", info.IndexServerAddress) } if len(info.Labels) > 0 { diff --git a/cli/command/system/testdata/docker-info-badsec.golden b/cli/command/system/testdata/docker-info-badsec.golden index e25ac7c0cfe8..742f76adb3d1 100644 --- a/cli/command/system/testdata/docker-info-badsec.golden +++ b/cli/command/system/testdata/docker-info-badsec.golden @@ -41,7 +41,6 @@ Server: Goroutines: 135 System Time: 2017-08-24T17:44:34.077811894Z EventsListeners: 0 - Registry: https://index.docker.io/v1/ Labels: provider=digitalocean Experimental: false diff --git a/cli/command/system/testdata/docker-info-no-swarm.golden b/cli/command/system/testdata/docker-info-no-swarm.golden index 7a86abf10d10..6871d3e53494 100644 --- a/cli/command/system/testdata/docker-info-no-swarm.golden +++ b/cli/command/system/testdata/docker-info-no-swarm.golden @@ -46,7 +46,6 @@ Server: Goroutines: 135 System Time: 2017-08-24T17:44:34.077811894Z EventsListeners: 0 - Registry: https://index.docker.io/v1/ Labels: provider=digitalocean Experimental: false diff --git a/cli/command/system/testdata/docker-info-plugins.golden b/cli/command/system/testdata/docker-info-plugins.golden index 98c88d0ea050..03e61c0dd13a 100644 --- a/cli/command/system/testdata/docker-info-plugins.golden +++ b/cli/command/system/testdata/docker-info-plugins.golden @@ -51,7 +51,6 @@ Server: Goroutines: 135 System Time: 2017-08-24T17:44:34.077811894Z EventsListeners: 0 - Registry: https://index.docker.io/v1/ Labels: provider=digitalocean Experimental: false diff --git a/cli/command/system/testdata/docker-info-with-labels-empty.golden b/cli/command/system/testdata/docker-info-with-labels-empty.golden index fa296fb1028e..f9f7f7ba0b4b 100644 --- a/cli/command/system/testdata/docker-info-with-labels-empty.golden +++ b/cli/command/system/testdata/docker-info-with-labels-empty.golden @@ -45,7 +45,6 @@ Server: Goroutines: 135 System Time: 2017-08-24T17:44:34.077811894Z EventsListeners: 0 - Registry: https://index.docker.io/v1/ Experimental: false Insecure Registries: 127.0.0.0/8 diff --git a/cli/command/system/testdata/docker-info-with-labels-nil.golden b/cli/command/system/testdata/docker-info-with-labels-nil.golden index fa296fb1028e..f9f7f7ba0b4b 100644 --- a/cli/command/system/testdata/docker-info-with-labels-nil.golden +++ b/cli/command/system/testdata/docker-info-with-labels-nil.golden @@ -45,7 +45,6 @@ Server: Goroutines: 135 System Time: 2017-08-24T17:44:34.077811894Z EventsListeners: 0 - Registry: https://index.docker.io/v1/ Experimental: false Insecure Registries: 127.0.0.0/8 diff --git a/cli/command/system/testdata/docker-info-with-swarm.golden b/cli/command/system/testdata/docker-info-with-swarm.golden index d1905ac4f55e..69425654a91e 100644 --- a/cli/command/system/testdata/docker-info-with-swarm.golden +++ b/cli/command/system/testdata/docker-info-with-swarm.golden @@ -67,7 +67,6 @@ Server: Goroutines: 135 System Time: 2017-08-24T17:44:34.077811894Z EventsListeners: 0 - Registry: https://index.docker.io/v1/ Labels: provider=digitalocean Experimental: false diff --git a/docs/reference/commandline/info.md b/docs/reference/commandline/info.md index ead61c62f38f..56be0fd2ef93 100644 --- a/docs/reference/commandline/info.md +++ b/docs/reference/commandline/info.md @@ -102,7 +102,6 @@ Server: Docker Root Dir: /var/lib/docker Debug Mode: false Username: gordontheturtle - Registry: https://index.docker.io/v1/ Experimental: false Insecure Registries: myinsecurehost:5000 @@ -164,7 +163,6 @@ Server: ID: 2880d38d-464e-4d01-91bd-c76f33ba3981 Docker Root Dir: C:\ProgramData\docker Debug Mode: false - Registry: https://index.docker.io/v1/ Experimental: true Insecure Registries: myregistry:5000 diff --git a/man/src/system/info.md b/man/src/system/info.md index ad8ce91d2c23..af486f623104 100644 --- a/man/src/system/info.md +++ b/man/src/system/info.md @@ -82,7 +82,6 @@ Server: Docker Root Dir: /var/lib/docker Debug Mode: false Username: gordontheturtle - Registry: https://index.docker.io/v1/ Experimental: false Insecure Registries: myinsecurehost:5000