fix 2 potential panics with mounts in swarm
| ... | ... |
@@ -154,6 +154,9 @@ func (m *MountOpt) Set(value string) error {
|
| 154 | 154 |
Labels: make(map[string]string), |
| 155 | 155 |
} |
| 156 | 156 |
} |
| 157 |
+ if mount.VolumeOptions.DriverConfig == nil {
|
|
| 158 |
+ mount.VolumeOptions.DriverConfig = &swarm.Driver{}
|
|
| 159 |
+ } |
|
| 157 | 160 |
return mount.VolumeOptions |
| 158 | 161 |
} |
| 159 | 162 |
|