Skip to content

Commit e61e7b3

Browse files
Skip parent layer options on bind mounts
Signed-off-by: Gabriel Adrian Samfira <[email protected]>
1 parent e430792 commit e61e7b3

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

snapshots/windows/windows.go

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -333,15 +333,19 @@ func (s *snapshotter) mounts(sn storage.Snapshot, key string) []mount.Mount {
333333
parentLayersJSON, _ := json.Marshal(parentLayerPaths)
334334
parentLayersOption := mount.ParentLayerPathsFlag + string(parentLayersJSON)
335335

336-
var mounts []mount.Mount
337-
mounts = append(mounts, mount.Mount{
338-
Source: source,
339-
Type: mountType,
340-
Options: []string{
341-
roFlag,
342-
parentLayersOption,
336+
options := []string{
337+
roFlag,
338+
}
339+
if mountType != "bind" {
340+
options = append(options, parentLayersOption)
341+
}
342+
mounts := []mount.Mount{
343+
{
344+
Source: source,
345+
Type: mountType,
346+
Options: options,
343347
},
344-
})
348+
}
345349

346350
return mounts
347351
}

0 commit comments

Comments
 (0)