-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Expand file tree
/
Copy pathcmd.go
More file actions
39 lines (36 loc) · 1.02 KB
/
cmd.go
File metadata and controls
39 lines (36 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package image
import (
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/spf13/cobra"
)
// NewImageCommand returns a cobra command for `image` subcommands
//
// Deprecated: Do not import commands directly. They will be removed in a future release.
func NewImageCommand(dockerCLI command.Cli) *cobra.Command {
return newImageCommand(dockerCLI)
}
// newImageCommand returns a cobra command for `image` subcommands
func newImageCommand(dockerCli command.Cli) *cobra.Command {
cmd := &cobra.Command{
Use: "image",
Short: "Manage images",
Args: cli.NoArgs,
RunE: command.ShowHelp(dockerCli.Err()),
}
cmd.AddCommand(
newBuildCommand(dockerCli),
newHistoryCommand(dockerCli),
newImportCommand(dockerCli),
newLoadCommand(dockerCli),
newPullCommand(dockerCli),
newPushCommand(dockerCli),
newSaveCommand(dockerCli),
newTagCommand(dockerCli),
newListCommand(dockerCli),
newImageRemoveCommand(dockerCli),
newInspectCommand(dockerCli),
newPruneCommand(dockerCli),
)
return cmd
}