set propagation default

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof 2024-09-17 09:30:34 +02:00 committed by Guillaume Lours
parent e885bc084d
commit cb00aaad28
1 changed files with 8 additions and 1 deletions

View File

@ -1114,8 +1114,15 @@ func buildBindOption(bind *types.ServiceVolumeBind) *mount.BindOptions {
if bind == nil {
return nil
}
// I miss ternary operator
propagation := types.PropagationRPrivate
if bind.Propagation != "" {
propagation = bind.Propagation
}
return &mount.BindOptions{
Propagation: mount.Propagation(bind.Propagation),
Propagation: mount.Propagation(propagation),
CreateMountpoint: bind.CreateHostPath,
// NonRecursive: false, FIXME missing from model ?
}