use bind API for bind mounts

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof 2025-04-10 18:46:35 +02:00 committed by Guillaume Lours
parent 29e642e232
commit c83f1285a8

View File

@ -862,11 +862,12 @@ func (s *composeService) buildContainerVolumes(
v.Source = m.Source
fallthrough
case !requireMountAPI(v.Bind):
vol := findVolumeByName(p.Volumes, m.Source)
if vol != nil {
binds = append(binds, toBindString(vol.Name, v))
continue
source := m.Source
if vol := findVolumeByName(p.Volumes, m.Source); vol != nil {
source = m.Source
}
binds = append(binds, toBindString(source, v))
continue
}
}
case mount.TypeVolume: