mirror of https://github.com/docker/cli.git
Use spf13/cobra for docker version
This fix is part of the effort to convert commands to spf13/cobra #23211. Thif fix coverted command `docker version` to use spf13/cobra NOTE: Most of the commands like `run`, `images` etc. goes to packages of `container`, `image`, `network`, etc. Didn't find a good place for `docker version` so just use the package `client` for now. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
parent
c278d97aad
commit
7e043735b6
|
@ -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/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"
|
||||||
cliflags "github.com/docker/docker/cli/flags"
|
cliflags "github.com/docker/docker/cli/flags"
|
||||||
|
@ -55,6 +56,7 @@ func NewCobraAdaptor(clientFlags *cliflags.ClientFlags) CobraAdaptor {
|
||||||
image.NewSearchCommand(dockerCli),
|
image.NewSearchCommand(dockerCli),
|
||||||
image.NewImportCommand(dockerCli),
|
image.NewImportCommand(dockerCli),
|
||||||
network.NewNetworkCommand(dockerCli),
|
network.NewNetworkCommand(dockerCli),
|
||||||
|
system.NewVersionCommand(dockerCli),
|
||||||
volume.NewVolumeCommand(dockerCli),
|
volume.NewVolumeCommand(dockerCli),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
1
usage.go
1
usage.go
|
@ -27,7 +27,6 @@ var DockerCommandUsage = []Command{
|
||||||
{"stats", "Display a live stream of container(s) resource usage statistics"},
|
{"stats", "Display a live stream of container(s) resource usage statistics"},
|
||||||
{"tag", "Tag an image into a repository"},
|
{"tag", "Tag an image into a repository"},
|
||||||
{"update", "Update configuration of one or more containers"},
|
{"update", "Update configuration of one or more containers"},
|
||||||
{"version", "Show the Docker version information"},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// DockerCommands stores all the docker command
|
// DockerCommands stores all the docker command
|
||||||
|
|
Loading…
Reference in New Issue