Merge pull request #21223 from cpuguy83/add_nocp_to_vols

Add explicit flags for volume cp/no-cp
Upstream-commit: de9ff4bdc0e17a0fd455790972d83133f424ef9d
Component: engine
This commit is contained in:
Tibor Vass
2016-03-22 13:45:12 -04:00
14 changed files with 123 additions and 28 deletions
+1 -2
View File
@@ -63,8 +63,7 @@ func (daemon *Daemon) createContainerPlatformSpecificSettings(container *contain
// this is only called when the container is created.
func (daemon *Daemon) populateVolumes(c *container.Container) error {
for _, mnt := range c.MountPoints {
// skip binds and volumes referenced by other containers (ie, volumes-from)
if mnt.Driver == "" || mnt.Volume == nil || len(daemon.volumes.Refs(mnt.Volume)) > 1 {
if !mnt.CopyData || mnt.Volume == nil {
continue
}
+1
View File
@@ -131,6 +131,7 @@ func (daemon *Daemon) registerMountPoints(container *container.Container, hostCo
bind = setBindModeIfNull(bind)
}
}
if label.RelabelNeeded(bind.Mode) {
if err := label.Relabel(bind.Source, container.MountLabel, label.IsShared(bind.Mode)); err != nil {
return err