mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
LCOW: Regular mount if only one layer
Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
parent
6feae06003
commit
420dc4eeb4
1 changed files with 4 additions and 1 deletions
|
@ -299,7 +299,10 @@ func (svm *serviceVM) createUnionMount(mountName string, mvds ...hcsshim.MappedV
|
||||||
}
|
}
|
||||||
|
|
||||||
var cmd string
|
var cmd string
|
||||||
if mvds[0].ReadOnly {
|
if len(mvds) == 1 {
|
||||||
|
// `FROM SCRATCH` case and the only layer. No overlay required.
|
||||||
|
cmd = fmt.Sprintf("mount %s %s", mvds[0].ContainerPath, mountName)
|
||||||
|
} else if mvds[0].ReadOnly {
|
||||||
// Readonly overlay
|
// Readonly overlay
|
||||||
cmd = fmt.Sprintf("mount -t overlay overlay -olowerdir=%s %s",
|
cmd = fmt.Sprintf("mount -t overlay overlay -olowerdir=%s %s",
|
||||||
strings.Join(lowerLayers, ","),
|
strings.Join(lowerLayers, ","),
|
||||||
|
|
Loading…
Add table
Reference in a new issue