Probe all drivers if volume driver not specified
This fixes an issue where `docker run -v foo:/bar --volume-driver <remote driver>` -> daemon restart -> `docker run -v foo:/bar` would make a `local` volume after the restart instead of using the existing volume from the remote driver. Signed-off-by: Brian Goff <cpuguy83@gmail.com> Upstream-commit: 00ec6102d993a752bd8dfb4ee393a4e58e59a4fe Component: engine
This commit is contained in:
@@ -117,7 +117,7 @@ func (daemon *Daemon) registerMountPoints(container *container.Container, hostCo
|
||||
return derr.ErrorCodeMountDup.WithArgs(bind.Destination)
|
||||
}
|
||||
|
||||
if len(bind.Name) > 0 && len(bind.Driver) > 0 {
|
||||
if len(bind.Name) > 0 {
|
||||
// create the volume
|
||||
v, err := daemon.volumes.CreateWithRef(bind.Name, bind.Driver, container.ID, nil)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user