Make ctr --rootfs an absolute path
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
9f3240364f
commit
6d3a70eb58
1 changed files with 5 additions and 1 deletions
|
@ -193,11 +193,15 @@ var runCommand = cli.Command{
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
abs, err := filepath.Abs(context.String("rootfs"))
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
// for ctr right now just do a bind mount
|
// for ctr right now just do a bind mount
|
||||||
rootfs := []*mount.Mount{
|
rootfs := []*mount.Mount{
|
||||||
{
|
{
|
||||||
Type: "bind",
|
Type: "bind",
|
||||||
Source: context.String("rootfs"),
|
Source: abs,
|
||||||
Options: []string{
|
Options: []string{
|
||||||
"rw",
|
"rw",
|
||||||
"rbind",
|
"rbind",
|
||||||
|
|
Loading…
Reference in a new issue