2016-06-23 13:03:40 -04:00
|
|
|
package image
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
|
2017-04-17 18:07:56 -04:00
|
|
|
"github.com/docker/cli/cli"
|
|
|
|
"github.com/docker/cli/cli/command"
|
2016-06-23 13:03:40 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
// NewImageCommand returns a cobra command for `image` subcommands
|
2017-06-21 17:20:49 -04:00
|
|
|
func NewImageCommand(dockerCli command.Cli) *cobra.Command {
|
2016-06-23 13:03:40 -04:00
|
|
|
cmd := &cobra.Command{
|
|
|
|
Use: "image",
|
2016-09-12 11:37:00 -04:00
|
|
|
Short: "Manage images",
|
2016-06-23 13:03:40 -04:00
|
|
|
Args: cli.NoArgs,
|
2017-05-03 17:58:52 -04:00
|
|
|
RunE: command.ShowHelp(dockerCli.Err()),
|
2016-06-23 13:03:40 -04: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 17:04:34 -04:00
|
|
|
NewPruneCommand(dockerCli),
|
2016-06-23 13:03:40 -04:00
|
|
|
)
|
|
|
|
return cmd
|
|
|
|
}
|