add --mount option to ctr

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
Evan Hazlett
2017-05-22 12:47:31 -04:00
parent e4bb820b55
commit ef026e83fa
3 changed files with 49 additions and 0 deletions

View File

@@ -222,6 +222,14 @@ func spec(id string, config *ocispec.ImageConfig, context *cli.Context, rootfs s
Type: "network",
})
}
for _, mount := range context.StringSlice("mount") {
m, err := parseMountFlag(mount)
if err != nil {
return nil, err
}
s.Mounts = append(s.Mounts, m)
}
return s, nil
}