Update to use runc 0.0.8
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
01176f2d7f
commit
20a39bce97
2 changed files with 6 additions and 7 deletions
|
@ -82,9 +82,7 @@ func (p *process) start() error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
args := []string{
|
args := []string{}
|
||||||
"--id", p.id,
|
|
||||||
}
|
|
||||||
if p.exec {
|
if p.exec {
|
||||||
args = append(args, "exec",
|
args = append(args, "exec",
|
||||||
"--process", filepath.Join(cwd, "process.json"),
|
"--process", filepath.Join(cwd, "process.json"),
|
||||||
|
@ -115,6 +113,7 @@ func (p *process) start() error {
|
||||||
args = append(args,
|
args = append(args,
|
||||||
"-d",
|
"-d",
|
||||||
"--pid-file", filepath.Join(cwd, "pid"),
|
"--pid-file", filepath.Join(cwd, "pid"),
|
||||||
|
p.id,
|
||||||
)
|
)
|
||||||
cmd := exec.Command("runc", args...)
|
cmd := exec.Command("runc", args...)
|
||||||
cmd.Dir = p.bundle
|
cmd.Dir = p.bundle
|
||||||
|
@ -148,7 +147,7 @@ func (p *process) pid() int {
|
||||||
|
|
||||||
func (p *process) delete() error {
|
func (p *process) delete() error {
|
||||||
if !p.exec {
|
if !p.exec {
|
||||||
return exec.Command("runc", "--id", p.id, "delete").Run()
|
return exec.Command("runc", "delete", p.id).Run()
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -216,11 +216,11 @@ func (c *container) readSpec() (*specs.LinuxSpec, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *container) Pause() error {
|
func (c *container) Pause() error {
|
||||||
return exec.Command("runc", "--id", c.id, "pause").Run()
|
return exec.Command("runc", "pause", c.id).Run()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *container) Resume() error {
|
func (c *container) Resume() error {
|
||||||
return exec.Command("runc", "--id", c.id, "resume").Run()
|
return exec.Command("runc", "resume", c.id).Run()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *container) State() State {
|
func (c *container) State() State {
|
||||||
|
@ -287,7 +287,6 @@ func (c *container) Checkpoint(cpt Checkpoint) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
args := []string{
|
args := []string{
|
||||||
"--id", c.id,
|
|
||||||
"checkpoint",
|
"checkpoint",
|
||||||
"--image-path", path,
|
"--image-path", path,
|
||||||
}
|
}
|
||||||
|
@ -306,6 +305,7 @@ func (c *container) Checkpoint(cpt Checkpoint) error {
|
||||||
if cpt.UnixSockets {
|
if cpt.UnixSockets {
|
||||||
add("--ext-unix-sk")
|
add("--ext-unix-sk")
|
||||||
}
|
}
|
||||||
|
add(c.id)
|
||||||
return exec.Command("runc", args...).Run()
|
return exec.Command("runc", args...).Run()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue