From cb00aaad288ff83ed98835a1edea635800f5b083 Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Tue, 17 Sep 2024 09:30:34 +0200 Subject: [PATCH] set propagation default Signed-off-by: Nicolas De Loof --- pkg/compose/create.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg/compose/create.go b/pkg/compose/create.go index a08d41235..b08cadd9e 100644 --- a/pkg/compose/create.go +++ b/pkg/compose/create.go @@ -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 ? }