ctr: use full path for bundle in run
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
parent
f9aac9d599
commit
8e603d2e48
1 changed files with 5 additions and 2 deletions
|
@ -85,9 +85,13 @@ var runCommand = cli.Command{
|
||||||
}
|
}
|
||||||
defer os.RemoveAll(tmpDir)
|
defer os.RemoveAll(tmpDir)
|
||||||
|
|
||||||
|
bundle, err := filepath.Abs(context.String("bundle"))
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
crOpts := &execution.CreateContainerRequest{
|
crOpts := &execution.CreateContainerRequest{
|
||||||
ID: id,
|
ID: id,
|
||||||
BundlePath: context.String("bundle"),
|
BundlePath: bundle,
|
||||||
Console: context.Bool("tty"),
|
Console: context.Bool("tty"),
|
||||||
Stdin: filepath.Join(tmpDir, "stdin"),
|
Stdin: filepath.Join(tmpDir, "stdin"),
|
||||||
Stdout: filepath.Join(tmpDir, "stdout"),
|
Stdout: filepath.Join(tmpDir, "stdout"),
|
||||||
|
@ -116,7 +120,6 @@ var runCommand = cli.Command{
|
||||||
select {
|
select {
|
||||||
case e, more := <-evCh:
|
case e, more := <-evCh:
|
||||||
if !more {
|
if !more {
|
||||||
fmt.Println("No More!")
|
|
||||||
break eventLoop
|
break eventLoop
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue