forked from hyperhq/runv
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.go
More file actions
53 lines (49 loc) · 1.64 KB
/
run.go
File metadata and controls
53 lines (49 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package main
import (
"github.com/codegangsta/cli"
)
var runCommand = cli.Command{
Name: "run",
Usage: "run a container",
ArgsUsage: `<container-id>
Where "<container-id>" is your name for the instance of the container that you
are running. The name you provide for the container instance must be unique on
your host.`,
Description: `The create command creates an instance of a container for a bundle. The bundle
is a directory with a specification file named "` + specConfig + `" and a root
filesystem.
The specification file includes an args parameter. The args parameter is used
to specify command(s) that get run when the container is started. To change the
command(s) that get executed on start, edit the args parameter of the spec. See
"runv spec --help" for more explanation.`,
Flags: []cli.Flag{
cli.StringFlag{
Name: "bundle, b",
Value: getDefaultBundlePath(),
Usage: "path to the root of the bundle directory, defaults to the current directory",
},
cli.StringFlag{
Name: "console",
Usage: "specify the pty slave path for use with the container",
},
cli.StringFlag{
Name: "console-socket",
Usage: "specify the unix socket for sending the pty master back",
},
cli.StringFlag{
Name: "pid-file",
Usage: "specify the file to write the process id to",
},
cli.BoolFlag{
Name: "no-pivot",
Usage: "[ignore on runv] do not use pivot root to jail process inside rootfs. This should be used whenever the rootfs is on top of a ramdisk",
},
cli.BoolFlag{
Name: "detach, d",
Usage: "detach from the container's process",
},
},
Action: func(context *cli.Context) {
runContainer(context, false)
},
}