Make ctr --rootfs an absolute path

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2017-03-09 16:13:23 -08:00
parent 9f3240364f
commit 6d3a70eb58
1 changed files with 5 additions and 1 deletions

View File

@ -193,11 +193,15 @@ var runCommand = cli.Command{
if err != nil {
return err
}
abs, err := filepath.Abs(context.String("rootfs"))
if err != nil {
return err
}
// for ctr right now just do a bind mount
rootfs := []*mount.Mount{
{
Type: "bind",
Source: context.String("rootfs"),
Source: abs,
Options: []string{
"rw",
"rbind",