Skip parent layer options on bind mounts
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
7f82dd91f4
commit
ca5605b4a2
@ -333,15 +333,19 @@ func (s *snapshotter) mounts(sn storage.Snapshot, key string) []mount.Mount {
|
||||
parentLayersJSON, _ := json.Marshal(parentLayerPaths)
|
||||
parentLayersOption := mount.ParentLayerPathsFlag + string(parentLayersJSON)
|
||||
|
||||
var mounts []mount.Mount
|
||||
mounts = append(mounts, mount.Mount{
|
||||
Source: source,
|
||||
Type: mountType,
|
||||
Options: []string{
|
||||
roFlag,
|
||||
parentLayersOption,
|
||||
options := []string{
|
||||
roFlag,
|
||||
}
|
||||
if mountType != "bind" {
|
||||
options = append(options, parentLayersOption)
|
||||
}
|
||||
mounts := []mount.Mount{
|
||||
{
|
||||
Source: source,
|
||||
Type: mountType,
|
||||
Options: options,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
return mounts
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user