summaryrefslogtreecommitdiff
path: root/cmd/podman/inspect.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/inspect.go')
-rw-r--r--cmd/podman/inspect.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd/podman/inspect.go b/cmd/podman/inspect.go
index b2979c6ae..a1f3ef81f 100644
--- a/cmd/podman/inspect.go
+++ b/cmd/podman/inspect.go
@@ -34,19 +34,21 @@ var (
inspectCommand.GlobalFlags = MainGlobalOpts
return inspectCmd(&inspectCommand)
},
- Example: "CONTAINER-OR-IMAGE [CONTAINER-OR-IMAGE]...",
+ Example: `podman inspect alpine
+ podman inspect --format "imageId: {{.Id}} size: {{.Size}}" alpine
+ podman inspect --format "image: {{.ImageName}} driver: {{.Driver}}" myctr`,
}
)
func init() {
inspectCommand.Command = _inspectCommand
+ inspectCommand.SetUsageTemplate(UsageTemplate())
flags := inspectCommand.Flags()
flags.StringVarP(&inspectCommand.TypeObject, "type", "t", inspectAll, "Return JSON for specified type, (e.g image, container or task)")
flags.StringVarP(&inspectCommand.Format, "format", "f", "", "Change the output format to a Go template")
flags.BoolVarP(&inspectCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of if the type is a container")
flags.BoolVarP(&inspectCommand.Size, "size", "s", false, "Display total file size if the type is container")
- rootCmd.AddCommand(inspectCommand.Command)
}
func inspectCmd(c *cliconfig.InspectValues) error {