MCPcopy Create free account
hub / github.com/docker/cli / convertVolumeToMount

Function convertVolumeToMount

cli/compose/convert/volume.go:238–258  ·  view source on GitHub ↗
(
	volume composetypes.ServiceVolumeConfig,
	stackVolumes volumes,
	namespace Namespace,
)

Source from the content-addressed store, hash-verified

236}
237
238func convertVolumeToMount(
239 volume composetypes.ServiceVolumeConfig,
240 stackVolumes volumes,
241 namespace Namespace,
242) (mount.Mount, error) {
243 switch volume.Type {
244 case "volume", "":
245 return handleVolumeToMount(volume, stackVolumes, namespace)
246 case "image":
247 return handleImageToMount(volume)
248 case "bind":
249 return handleBindToMount(volume)
250 case "tmpfs":
251 return handleTmpfsToMount(volume)
252 case "npipe":
253 return handleNpipeToMount(volume)
254 case "cluster":
255 return handleClusterToMount(volume, stackVolumes, namespace)
256 }
257 return mount.Mount{}, errors.New("volume type must be volume, bind, tmpfs, npipe, or cluster")
258}

Calls 6

handleVolumeToMountFunction · 0.85
handleImageToMountFunction · 0.85
handleBindToMountFunction · 0.85
handleTmpfsToMountFunction · 0.85
handleNpipeToMountFunction · 0.85
handleClusterToMountFunction · 0.85

Used in the wild real call sites across dependent graphs

searching dependent graphs…