| 31 | ) |
| 32 | |
| 33 | func StopCommand() *cobra.Command { |
| 34 | var cmd = &cobra.Command{ |
| 35 | Use: "stop [flags] CONTAINER [CONTAINER, ...]", |
| 36 | Args: cobra.MinimumNArgs(1), |
| 37 | Short: "Stop one or more running containers", |
| 38 | RunE: stopAction, |
| 39 | ValidArgsFunction: stopShellComplete, |
| 40 | SilenceUsage: true, |
| 41 | SilenceErrors: true, |
| 42 | } |
| 43 | cmd.Flags().IntP("time", "t", 10, "Seconds to wait before sending a SIGKILL") |
| 44 | cmd.Flags().StringP("signal", "s", "SIGTERM", "Signal to send to the container") |
| 45 | return cmd |
| 46 | } |
| 47 | |
| 48 | func stopOptions(cmd *cobra.Command) (types.ContainerStopOptions, error) { |
| 49 | globalOptions, err := helpers.ProcessRootCmdFlags(cmd) |