diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-03-14 00:31:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-14 00:31:22 -0700 |
commit | fb5f8ebcb649cc25ee0207364ac386ada855e976 (patch) | |
tree | fd986f3fd9bc108dcc5fb605cc9480c07ebc034e /cmd/podman/container.go | |
parent | 7426d4fbbeaf5ebd3d55576add89b99cd3f3f760 (diff) | |
parent | 3de5e4a99fe441e41e1a1c9f90e8bb6e0ff1bd28 (diff) | |
download | podman-fb5f8ebcb649cc25ee0207364ac386ada855e976.tar.gz podman-fb5f8ebcb649cc25ee0207364ac386ada855e976.tar.bz2 podman-fb5f8ebcb649cc25ee0207364ac386ada855e976.zip |
Merge pull request #2624 from edsantiago/inspect_usability
Usability cleanup for 'inspect'
Diffstat (limited to 'cmd/podman/container.go')
-rw-r--r-- | cmd/podman/container.go | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/cmd/podman/container.go b/cmd/podman/container.go index 8ad8d7a44..ce6ad8883 100644 --- a/cmd/podman/container.go +++ b/cmd/podman/container.go @@ -19,6 +19,20 @@ var ( }, } + contInspectSubCommand cliconfig.InspectValues + _contInspectSubCommand = &cobra.Command{ + Use: strings.Replace(_inspectCommand.Use, "| IMAGE", "", 1), + Short: "Display the configuration of a container", + Long: `Displays the low-level information on a container identified by name or ID.`, + RunE: func(cmd *cobra.Command, args []string) error { + contInspectSubCommand.InputArgs = args + contInspectSubCommand.GlobalFlags = MainGlobalOpts + return inspectCmd(&contInspectSubCommand) + }, + Example: `podman container inspect myCtr + podman container inspect -l --format '{{.Id}} {{.Config.Labels}}'`, + } + listSubCommand cliconfig.PsValues _listSubCommand = &cobra.Command{ Use: strings.Replace(_psCommand.Use, "ps", "list", 1), @@ -37,12 +51,15 @@ var ( // Commands that are universally implemented. containerCommands = []*cobra.Command{ _containerExistsCommand, - _inspectCommand, + _contInspectSubCommand, _listSubCommand, } ) func init() { + contInspectSubCommand.Command = _contInspectSubCommand + inspectInit(&contInspectSubCommand) + listSubCommand.Command = _listSubCommand psInit(&listSubCommand) |