MCPcopy Create free account
hub / github.com/containerd/nerdctl / StopCommand

Function StopCommand

cmd/nerdctl/container/container_stop.go:33–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31)
32
33func 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
48func stopOptions(cmd *cobra.Command) (types.ContainerStopOptions, error) {
49 globalOptions, err := helpers.ProcessRootCmdFlags(cmd)

Callers 2

newAppFunction · 0.92
CommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…