MCPcopy Index your code
hub / github.com/docker/cli / newUnpauseCommand

Function newUnpauseCommand

cli/command/container/unpause.go:21–41  ·  view source on GitHub ↗

newUnpauseCommand creates a new cobra.Command for "docker container unpause".

(dockerCLI command.Cli)

Source from the content-addressed store, hash-verified

19
20// newUnpauseCommand creates a new cobra.Command for "docker container unpause".
21func newUnpauseCommand(dockerCLI command.Cli) *cobra.Command {
22 var opts unpauseOptions
23
24 cmd := &cobra.Command{
25 Use: "unpause CONTAINER [CONTAINER...]",
26 Short: "Unpause all processes within one or more containers",
27 Args: cli.RequiresMinArgs(1),
28 RunE: func(cmd *cobra.Command, args []string) error {
29 opts.containers = args
30 return runUnpause(cmd.Context(), dockerCLI, &opts)
31 },
32 Annotations: map[string]string{
33 "aliases": "docker container unpause, docker unpause",
34 },
35 ValidArgsFunction: completion.ContainerNames(dockerCLI, false, func(ctr container.Summary) bool {
36 return ctr.State == container.StatePaused
37 }),
38 DisableFlagsInUseLine: true,
39 }
40 return cmd
41}
42
43func runUnpause(ctx context.Context, dockerCLI command.Cli, opts *unpauseOptions) error {
44 apiClient := dockerCLI.Client()

Callers 1

newContainerCommandFunction · 0.85

Calls 1

runUnpauseFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…