MCPcopy Index your code
hub / github.com/docker/compose / buildBindOption

Function buildBindOption

pkg/compose/create.go:1269–1286  ·  view source on GitHub ↗
(bind *types.ServiceVolumeBind)

Source from the content-addressed store, hash-verified

1267}
1268
1269func buildBindOption(bind *types.ServiceVolumeBind) *mount.BindOptions {
1270 if bind == nil {
1271 return nil
1272 }
1273 opts := &mount.BindOptions{
1274 Propagation: mount.Propagation(bind.Propagation),
1275 CreateMountpoint: bool(bind.CreateHostPath),
1276 }
1277 switch bind.Recursive {
1278 case "disabled":
1279 opts.NonRecursive = true
1280 case "writable":
1281 opts.ReadOnlyNonRecursive = true
1282 case "readonly":
1283 opts.ReadOnlyForceRecursive = true
1284 }
1285 return opts
1286}
1287
1288func buildVolumeOptions(vol *types.ServiceVolumeVolume) *mount.VolumeOptions {
1289 if vol == nil {

Callers 1

buildMountOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…