5 import "github.com/urfave/cli"
7 var pauseCommand = cli.Command{
9 Usage: "pause suspends all processes inside the container",
10 ArgsUsage: `<container-id>
12 Where "<container-id>" is the name for the instance of the container to be
14 Description: `The pause command suspends all processes in the instance of the container.
16 Use runc list to identiy instances of containers and their current status.`,
17 Action: func(context *cli.Context) error {
18 if err := checkArgs(context, 1, exactArgs); err != nil {
21 container, err := getContainer(context)
25 if err := container.Pause(); err != nil {
33 var resumeCommand = cli.Command{
35 Usage: "resumes all processes that have been previously paused",
36 ArgsUsage: `<container-id>
38 Where "<container-id>" is the name for the instance of the container to be
40 Description: `The resume command resumes all processes in the instance of the container.
42 Use runc list to identiy instances of containers and their current status.`,
43 Action: func(context *cli.Context) error {
44 if err := checkArgs(context, 1, exactArgs); err != nil {
47 container, err := getContainer(context)
51 if err := container.Resume(); err != nil {