volumeRequiresMountAPI check if Volume declaration can be implemented by the plain old Bind API or uses any of the advanced options which require use of Mount API
(vol *types.ServiceVolumeVolume)
| 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 |
| 977 | func volumeRequiresMountAPI(vol *types.ServiceVolumeVolume) bool { |
| 978 | switch { |
| 979 | case vol == nil: |
| 980 | return false |
| 981 | case len(vol.Labels) > 0: |
| 982 | return true |
| 983 | case vol.Subpath != "": |
| 984 | return true |
| 985 | case vol.NoCopy: |
| 986 | return true |
| 987 | default: |
| 988 | return false |
| 989 | } |
| 990 | } |
| 991 | |
| 992 | func (s *composeService) buildContainerMountOptions(ctx context.Context, p types.Project, service types.ServiceConfig, inherit *container.Summary) ([]mount.Mount, error) { |
| 993 | mounts := map[string]mount.Mount{} |
no outgoing calls
no test coverage detected