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

Function Volumes

cli/compose/convert/volume.go:15–25  ·  view source on GitHub ↗

Volumes from compose-file types to engine api types

(serviceVolumes []composetypes.ServiceVolumeConfig, stackVolumes volumes, namespace Namespace)

Source from the content-addressed store, hash-verified

13
14// Volumes from compose-file types to engine api types
15func Volumes(serviceVolumes []composetypes.ServiceVolumeConfig, stackVolumes volumes, namespace Namespace) ([]mount.Mount, error) {
16 mounts := make([]mount.Mount, 0, len(serviceVolumes))
17 for _, volumeConfig := range serviceVolumes {
18 mnt, err := convertVolumeToMount(volumeConfig, stackVolumes, namespace)
19 if err != nil {
20 return nil, err
21 }
22 mounts = append(mounts, mnt)
23 }
24 return mounts, nil
25}
26
27func createMountFromVolume(volume composetypes.ServiceVolumeConfig) mount.Mount {
28 return mount.Mount{

Calls 1

convertVolumeToMountFunction · 0.85

Used in the wild real call sites across dependent graphs

searching dependent graphs…