зеркало из https://github.com/microsoft/docker.git
ignore registry url from user when it is the default namespace
Signed-off-by: Krasi Georgiev <krasi@vip-consult.solutions>
This commit is contained in:
Родитель
abe6a073c7
Коммит
2914098996
|
@ -7,6 +7,7 @@ import (
|
||||||
|
|
||||||
"github.com/docker/docker/cli"
|
"github.com/docker/docker/cli"
|
||||||
"github.com/docker/docker/cli/command"
|
"github.com/docker/docker/cli/command"
|
||||||
|
"github.com/docker/docker/registry"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -49,7 +50,7 @@ func runLogin(dockerCli *command.DockerCli, opts loginOptions) error {
|
||||||
serverAddress string
|
serverAddress string
|
||||||
authServer = command.ElectAuthServer(ctx, dockerCli)
|
authServer = command.ElectAuthServer(ctx, dockerCli)
|
||||||
)
|
)
|
||||||
if opts.serverAddress != "" {
|
if opts.serverAddress != "" && opts.serverAddress != registry.DefaultNamespace {
|
||||||
serverAddress = opts.serverAddress
|
serverAddress = opts.serverAddress
|
||||||
} else {
|
} else {
|
||||||
serverAddress = authServer
|
serverAddress = authServer
|
||||||
|
|
Загрузка…
Ссылка в новой задаче