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

Function RestartCommand

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

Source from the content-addressed store, hash-verified

28)
29
30func RestartCommand() *cobra.Command {
31 var cmd = &cobra.Command{
32 Use: "restart [flags] CONTAINER [CONTAINER, ...]",
33 Args: cobra.MinimumNArgs(1),
34 Short: "Restart one or more running containers",
35 RunE: restartAction,
36 ValidArgsFunction: startShellComplete,
37 SilenceUsage: true,
38 SilenceErrors: true,
39 }
40 cmd.Flags().UintP("time", "t", 10, "Seconds to wait for stop before killing it")
41 cmd.Flags().StringP("signal", "s", "", "Signal to send to stop the container, before killing it")
42 return cmd
43}
44
45func restartOptions(cmd *cobra.Command) (types.ContainerRestartOptions, 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…