2016-06-23 17:03:40 +00:00
|
|
|
package image
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
|
|
|
|
"github.com/docker/docker/cli"
|
|
|
|
"github.com/docker/docker/cli/command"
|
|
|
|
)
|
|
|
|
|
|
|
|
// NewImageCommand returns a cobra command for `image` subcommands
|
|
|
|
func NewImageCommand(dockerCli *command.DockerCli) *cobra.Command {
|
|
|
|
cmd := &cobra.Command{
|
|
|
|
Use: "image",
|
2016-09-12 15:37:00 +00:00
|
|
|
Short: "Manage images",
|
2016-06-23 17:03:40 +00:00
|
|
|
Args: cli.NoArgs,
|
2016-11-17 18:54:10 +00:00
|
|
|
RunE: dockerCli.ShowHelp,
|
2016-06-23 17:03:40 +00:00
|
|
|
}
|
|
|
|
cmd.AddCommand(
|
|
|
|
NewBuildCommand(dockerCli),
|
|
|
|
NewHistoryCommand(dockerCli),
|
|
|
|
NewImportCommand(dockerCli),
|
|
|
|
NewLoadCommand(dockerCli),
|
|
|
|
NewPullCommand(dockerCli),
|
|
|
|
NewPushCommand(dockerCli),
|
|
|
|
NewSaveCommand(dockerCli),
|
|
|
|
NewTagCommand(dockerCli),
|
|
|
|
newListCommand(dockerCli),
|
|
|
|
newRemoveCommand(dockerCli),
|
|
|
|
newInspectCommand(dockerCli),
|
2016-09-22 21:04:34 +00:00
|
|
|
NewPruneCommand(dockerCli),
|
2016-06-23 17:03:40 +00:00
|
|
|
)
|
|
|
|
return cmd
|
|
|
|
}
|