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

Function KillCommand

cmd/nerdctl/container/container_kill.go:31–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29)
30
31func KillCommand() *cobra.Command {
32 var cmd = &cobra.Command{
33 Use: "kill [flags] CONTAINER [CONTAINER, ...]",
34 Short: "Kill one or more running containers",
35 Args: cobra.MinimumNArgs(1),
36 RunE: killAction,
37 ValidArgsFunction: killShellComplete,
38 SilenceUsage: true,
39 SilenceErrors: true,
40 }
41 cmd.Flags().StringP("signal", "s", "KILL", "Signal to send to the container")
42 return cmd
43}
44
45func killAction(cmd *cobra.Command, args []string) error {
46 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…