mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
fix 2 potential panics with mounts in swarm
Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
parent
c913dd5f57
commit
ffeb9fcb2a
2 changed files with 4 additions and 1 deletions
|
@ -154,6 +154,9 @@ func (m *MountOpt) Set(value string) error {
|
||||||
Labels: make(map[string]string),
|
Labels: make(map[string]string),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if mount.VolumeOptions.DriverConfig == nil {
|
||||||
|
mount.VolumeOptions.DriverConfig = &swarm.Driver{}
|
||||||
|
}
|
||||||
return mount.VolumeOptions
|
return mount.VolumeOptions
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -192,7 +192,7 @@ func (c *containerAdapter) createVolumes(ctx context.Context, backend executorpk
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if mount.VolumeOptions != nil {
|
if mount.VolumeOptions == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue