MCPcopy
hub / github.com/docker/compose / bindRequiresMountAPI

Function bindRequiresMountAPI

pkg/compose/create.go:960–973  ·  view source on GitHub ↗

bindRequiresMountAPI check if Bind declaration can be implemented by the plain old Bind API or uses any of the advanced options which require use of Mount API

(bind *types.ServiceVolumeBind)

Source from the content-addressed store, hash-verified

958// bindRequiresMountAPI check if Bind declaration can be implemented by the plain old Bind API or uses any of the advanced
959// options which require use of Mount API
960func bindRequiresMountAPI(bind *types.ServiceVolumeBind) bool {
961 switch {
962 case bind == nil:
963 return false
964 case !bool(bind.CreateHostPath):
965 return true
966 case bind.Propagation != "":
967 return true
968 case bind.Recursive != "":
969 return true
970 default:
971 return false
972 }
973}
974
975// volumeRequiresMountAPI check if Volume declaration can be implemented by the plain old Bind API or uses any of the advanced
976// options which require use of Mount API

Callers 1

buildContainerVolumesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected