mirror of
https://github.com/containers/podman.git
synced 2025-06-19 00:06:43 +08:00
podmanv2 add pre-run to each commmand
each container command needs a prerune because it is not part of the containers subcommand yet Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
@ -19,6 +19,7 @@ var (
|
||||
Short: "Kill one or more running containers with a specific signal",
|
||||
Long: killDescription,
|
||||
RunE: kill,
|
||||
PersistentPreRunE: preRunE,
|
||||
Args: func(cmd *cobra.Command, args []string) error {
|
||||
return parse.CheckAllLatestAndCIDFile(cmd, args, false, false)
|
||||
},
|
||||
|
@ -19,6 +19,7 @@ var (
|
||||
Short: "Pause all the processes in one or more containers",
|
||||
Long: pauseDescription,
|
||||
RunE: pause,
|
||||
PersistentPreRunE: preRunE,
|
||||
Example: `podman pause mywebserver
|
||||
podman pause 860a4b23
|
||||
podman pause -a`,
|
||||
|
@ -22,6 +22,7 @@ var (
|
||||
Short: "Restart one or more containers",
|
||||
Long: restartDescription,
|
||||
RunE: restart,
|
||||
PersistentPreRunE: preRunE,
|
||||
Args: func(cmd *cobra.Command, args []string) error {
|
||||
return parse.CheckAllLatestAndCIDFile(cmd, args, false, false)
|
||||
},
|
||||
|
@ -23,6 +23,7 @@ var (
|
||||
Short: "Remove one or more containers",
|
||||
Long: rmDescription,
|
||||
RunE: rm,
|
||||
PersistentPreRunE: preRunE,
|
||||
Args: func(cmd *cobra.Command, args []string) error {
|
||||
return parse.CheckAllLatestAndCIDFile(cmd, args, false, true)
|
||||
},
|
||||
|
@ -22,6 +22,7 @@ var (
|
||||
Short: "Stop one or more containers",
|
||||
Long: stopDescription,
|
||||
RunE: stop,
|
||||
PersistentPreRunE: preRunE,
|
||||
Args: func(cmd *cobra.Command, args []string) error {
|
||||
return parse.CheckAllLatestAndCIDFile(cmd, args, false, true)
|
||||
},
|
||||
|
@ -19,6 +19,7 @@ var (
|
||||
Short: "Unpause the processes in one or more containers",
|
||||
Long: unpauseDescription,
|
||||
RunE: unpause,
|
||||
PersistentPreRunE: preRunE,
|
||||
Example: `podman unpause ctrID
|
||||
podman unpause --all`,
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ var (
|
||||
Short: "Block on one or more containers",
|
||||
Long: waitDescription,
|
||||
RunE: wait,
|
||||
PersistentPreRunE: preRunE,
|
||||
Args: func(cmd *cobra.Command, args []string) error {
|
||||
return parse.CheckAllLatestAndCIDFile(cmd, args, false, false)
|
||||
},
|
||||
|
Reference in New Issue
Block a user