cmd/dist: better organization and aliases for image command
Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
parent
f105db9626
commit
f8fe5605dd
21
cmd/dist/images.go
vendored
21
cmd/dist/images.go
vendored
@ -12,9 +12,19 @@ import (
|
|||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var imageCommand = cli.Command{
|
||||||
|
Name: "images",
|
||||||
|
Aliases: []string{"images"},
|
||||||
|
Usage: "image management",
|
||||||
|
Subcommands: cli.Commands{
|
||||||
|
imagesListCommand,
|
||||||
|
imageRemoveCommand,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
var imagesListCommand = cli.Command{
|
var imagesListCommand = cli.Command{
|
||||||
Name: "list",
|
Name: "list",
|
||||||
Aliases: []string{"images"},
|
Aliases: []string{"ls"},
|
||||||
Usage: "list images known to containerd",
|
Usage: "list images known to containerd",
|
||||||
ArgsUsage: "[flags] <ref>",
|
ArgsUsage: "[flags] <ref>",
|
||||||
Description: `List images registered with containerd.`,
|
Description: `List images registered with containerd.`,
|
||||||
@ -54,11 +64,12 @@ var imagesListCommand = cli.Command{
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
var rmiCommand = cli.Command{
|
var imageRemoveCommand = cli.Command{
|
||||||
Name: "rmi",
|
Name: "remove",
|
||||||
Usage: "Delete one or more images by reference.",
|
Aliases: []string{"rm"},
|
||||||
|
Usage: "Remove one or more images by reference.",
|
||||||
ArgsUsage: "[flags] <ref> [<ref>, ...]",
|
ArgsUsage: "[flags] <ref> [<ref>, ...]",
|
||||||
Description: `Delete one or more images by reference.`,
|
Description: `Remove one or more images by reference.`,
|
||||||
Flags: []cli.Flag{},
|
Flags: []cli.Flag{},
|
||||||
Action: func(clicontext *cli.Context) error {
|
Action: func(clicontext *cli.Context) error {
|
||||||
var (
|
var (
|
||||||
|
9
cmd/dist/main.go
vendored
9
cmd/dist/main.go
vendored
@ -93,15 +93,6 @@ distribution tool
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var imageCommand = cli.Command{
|
|
||||||
Name: "image",
|
|
||||||
Usage: "image management",
|
|
||||||
Subcommands: cli.Commands{
|
|
||||||
imagesListCommand,
|
|
||||||
rmiCommand,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
var contentCommand = cli.Command{
|
var contentCommand = cli.Command{
|
||||||
Name: "content",
|
Name: "content",
|
||||||
Usage: "content management",
|
Usage: "content management",
|
||||||
|
Loading…
Reference in New Issue
Block a user