Need to create bind mount volume if it does not exist.

In order to be consistent on creation of volumes for bind mounts
we need to create the source directory if it does not exist and the
user specified he wants it relabeled.

Can not do this lower down the stack, since we are not passing in the
mode fields.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
This commit is contained in:
Dan Walsh
2016-05-26 14:39:46 -04:00
parent 22aca92ee3
commit 322cc99c69
3 changed files with 12 additions and 13 deletions

View File

@@ -20,7 +20,7 @@ func (daemon *Daemon) setupMounts(c *container.Container) ([]container.Mount, er
if err := daemon.lazyInitializeVolume(c.ID, m); err != nil {
return nil, err
}
path, err := m.Setup()
path, err := m.Setup(c.MountLabel)
if err != nil {
return nil, err
}