mirror of https://github.com/docker/cli.git
Migrate login & logout command to cobra
Also moves some common stuff around : - `api/client/registry.go` for registry related method (`ElectAuthServer`, …) - `api/client/credentials.go` to interact with credentials Migrate logout command to cobra Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
parent
171adb0b0f
commit
d4fef62ce0
|
@ -5,6 +5,7 @@ import (
|
||||||
"github.com/docker/docker/api/client/container"
|
"github.com/docker/docker/api/client/container"
|
||||||
"github.com/docker/docker/api/client/image"
|
"github.com/docker/docker/api/client/image"
|
||||||
"github.com/docker/docker/api/client/network"
|
"github.com/docker/docker/api/client/network"
|
||||||
|
"github.com/docker/docker/api/client/registry"
|
||||||
"github.com/docker/docker/api/client/system"
|
"github.com/docker/docker/api/client/system"
|
||||||
"github.com/docker/docker/api/client/volume"
|
"github.com/docker/docker/api/client/volume"
|
||||||
"github.com/docker/docker/cli"
|
"github.com/docker/docker/cli"
|
||||||
|
@ -64,6 +65,8 @@ func NewCobraAdaptor(clientFlags *cliflags.ClientFlags) CobraAdaptor {
|
||||||
image.NewTagCommand(dockerCli),
|
image.NewTagCommand(dockerCli),
|
||||||
network.NewNetworkCommand(dockerCli),
|
network.NewNetworkCommand(dockerCli),
|
||||||
system.NewEventsCommand(dockerCli),
|
system.NewEventsCommand(dockerCli),
|
||||||
|
registry.NewLoginCommand(dockerCli),
|
||||||
|
registry.NewLogoutCommand(dockerCli),
|
||||||
system.NewVersionCommand(dockerCli),
|
system.NewVersionCommand(dockerCli),
|
||||||
volume.NewVolumeCommand(dockerCli),
|
volume.NewVolumeCommand(dockerCli),
|
||||||
)
|
)
|
||||||
|
|
2
usage.go
2
usage.go
|
@ -13,8 +13,6 @@ var DockerCommandUsage = []Command{
|
||||||
{"exec", "Run a command in a running container"},
|
{"exec", "Run a command in a running container"},
|
||||||
{"info", "Display system-wide information"},
|
{"info", "Display system-wide information"},
|
||||||
{"inspect", "Return low-level information on a container or image"},
|
{"inspect", "Return low-level information on a container or image"},
|
||||||
{"login", "Log in to a Docker registry"},
|
|
||||||
{"logout", "Log out from a Docker registry"},
|
|
||||||
{"ps", "List containers"},
|
{"ps", "List containers"},
|
||||||
{"pull", "Pull an image or a repository from a registry"},
|
{"pull", "Pull an image or a repository from a registry"},
|
||||||
{"push", "Push an image or a repository to a registry"},
|
{"push", "Push an image or a repository to a registry"},
|
||||||
|
|
Loading…
Reference in New Issue