Merge v1.2.1-master

Signed-off-by: Emile Vauge <emile@vauge.com>
This commit is contained in:
Emile Vauge 2017-04-11 17:10:46 +02:00
parent a590155b0b
commit aeb17182b4
No known key found for this signature in database
GPG key ID: D808B4C167352E59
396 changed files with 27271 additions and 9969 deletions

View file

@ -1,6 +1,7 @@
package main
import (
"errors"
"fmt"
"github.com/opencontainers/runc/libcontainer"
@ -9,14 +10,17 @@ import (
var startCommand = cli.Command{
Name: "start",
Usage: "start signals a created container to execute the user defined process",
Usage: "executes the user defined process in a created container",
ArgsUsage: `<container-id>
Where "<container-id>" is your name for the instance of the container that you
are starting. The name you provide for the container instance must be unique on
your host.`,
Description: `The start command signals the container to start the user's defined process.`,
Description: `The start command executes the user defined process in a created container.`,
Action: func(context *cli.Context) error {
if err := checkArgs(context, 1, exactArgs); err != nil {
return err
}
container, err := getContainer(context)
if err != nil {
return err
@ -29,11 +33,11 @@ your host.`,
case libcontainer.Created:
return container.Exec()
case libcontainer.Stopped:
return fmt.Errorf("cannot start a container that has run and stopped")
return errors.New("cannot start a container that has stopped")
case libcontainer.Running:
return fmt.Errorf("cannot start an already running container")
return errors.New("cannot start an already running container")
default:
return fmt.Errorf("cannot start a container in the %s state", status)
return fmt.Errorf("cannot start a container in the %s state\n", status)
}
},
}