container_create: follow symlink for mount host path
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
5e7c932771
commit
59c0218a9c
1 changed files with 5 additions and 0 deletions
|
@ -66,6 +66,11 @@ func addOCIBindMounts(mountLabel string, containerConfig *pb.ContainerConfig, sp
|
|||
}
|
||||
}
|
||||
|
||||
src, err := resolveSymbolicLink(src)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to resolve symlink %q: %v", src, err)
|
||||
}
|
||||
|
||||
options := []string{"rw"}
|
||||
if mount.Readonly {
|
||||
options = []string{"ro"}
|
||||
|
|
Loading…
Reference in a new issue