diff options
Diffstat (limited to 'cmd/podman/exists.go')
-rw-r--r-- | cmd/podman/exists.go | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/cmd/podman/exists.go b/cmd/podman/exists.go index 74a4c841b..109831e74 100644 --- a/cmd/podman/exists.go +++ b/cmd/podman/exists.go @@ -32,7 +32,7 @@ var ( Check if a pod exists in local storage ` _imageExistsCommand = &cobra.Command{ - Use: "exists", + Use: "exists IMAGE", Short: "Check if an image exists in local storage", Long: imageExistsDescription, RunE: func(cmd *cobra.Command, args []string) error { @@ -40,11 +40,12 @@ var ( imageExistsCommand.GlobalFlags = MainGlobalOpts return imageExistsCmd(&imageExistsCommand) }, - Example: `podman image exists imageID`, + Example: `podman image exists imageID + podman image exists alpine || podman pull alpine`, } _containerExistsCommand = &cobra.Command{ - Use: "exists", + Use: "exists CONTAINER", Short: "Check if a container exists in local storage", Long: containerExistsDescription, RunE: func(cmd *cobra.Command, args []string) error { @@ -53,11 +54,12 @@ var ( return containerExistsCmd(&containerExistsCommand) }, - Example: `podman container exists containerID`, + Example: `podman container exists containerID + podman container exists myctr || podman run --name myctr [etc...]`, } _podExistsCommand = &cobra.Command{ - Use: "exists", + Use: "exists POD", Short: "Check if a pod exists in local storage", Long: podExistsDescription, RunE: func(cmd *cobra.Command, args []string) error { @@ -65,16 +67,20 @@ var ( podExistsCommand.GlobalFlags = MainGlobalOpts return podExistsCmd(&podExistsCommand) }, - Example: `podman pod exists podID`, + Example: `podman pod exists podID + podman pod exists mypod || podman pod create --name mypod`, } ) func init() { imageExistsCommand.Command = _imageExistsCommand + imageExistsCommand.DisableFlagsInUseLine = true imageExistsCommand.SetUsageTemplate(UsageTemplate()) containerExistsCommand.Command = _containerExistsCommand + containerExistsCommand.DisableFlagsInUseLine = true containerExistsCommand.SetUsageTemplate(UsageTemplate()) podExistsCommand.Command = _podExistsCommand + podExistsCommand.DisableFlagsInUseLine = true podExistsCommand.SetUsageTemplate(UsageTemplate()) } |