Merge pull request #26723 from anusha-ragunathan/volmount_win
Add missing call to "VolumeDriver.Mount" during container start. Upstream-commit: fd1037b4325c1ae5b2e68d6f39ee0cd58a0a7d48 Component: engine
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
package daemon
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sort"
|
||||
|
||||
"github.com/docker/docker/container"
|
||||
@@ -25,14 +24,11 @@ func (daemon *Daemon) setupMounts(c *container.Container) ([]container.Mount, er
|
||||
if err := daemon.lazyInitializeVolume(c.ID, mount); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// If there is no source, take it from the volume path
|
||||
s := mount.Source
|
||||
if s == "" && mount.Volume != nil {
|
||||
s = mount.Volume.Path()
|
||||
}
|
||||
if s == "" {
|
||||
return nil, fmt.Errorf("No source for mount name '%s' driver %q destination '%s'", mount.Name, mount.Driver, mount.Destination)
|
||||
s, err := mount.Setup(c.MountLabel, 0, 0)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
mnts = append(mnts, container.Mount{
|
||||
Source: s,
|
||||
Destination: mount.Destination,
|
||||
|
||||
Reference in New Issue
Block a user