Add missing call to "VolumeDriver.Mount" during container start.
| ... | ... |
@@ -3,7 +3,6 @@ |
| 3 | 3 |
package daemon |
| 4 | 4 |
|
| 5 | 5 |
import ( |
| 6 |
- "fmt" |
|
| 7 | 6 |
"sort" |
| 8 | 7 |
|
| 9 | 8 |
"github.com/docker/docker/container" |
| ... | ... |
@@ -25,14 +24,11 @@ func (daemon *Daemon) setupMounts(c *container.Container) ([]container.Mount, er |
| 25 | 25 |
if err := daemon.lazyInitializeVolume(c.ID, mount); err != nil {
|
| 26 | 26 |
return nil, err |
| 27 | 27 |
} |
| 28 |
- // If there is no source, take it from the volume path |
|
| 29 |
- s := mount.Source |
|
| 30 |
- if s == "" && mount.Volume != nil {
|
|
| 31 |
- s = mount.Volume.Path() |
|
| 32 |
- } |
|
| 33 |
- if s == "" {
|
|
| 34 |
- return nil, fmt.Errorf("No source for mount name '%s' driver %q destination '%s'", mount.Name, mount.Driver, mount.Destination)
|
|
| 28 |
+ s, err := mount.Setup(c.MountLabel, 0, 0) |
|
| 29 |
+ if err != nil {
|
|
| 30 |
+ return nil, err |
|
| 35 | 31 |
} |
| 32 |
+ |
|
| 36 | 33 |
mnts = append(mnts, container.Mount{
|
| 37 | 34 |
Source: s, |
| 38 | 35 |
Destination: mount.Destination, |