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

Function handleNpipeToMount

cli/compose/convert/volume.go:172–193  ·  view source on GitHub ↗
(volume composetypes.ServiceVolumeConfig)

Source from the content-addressed store, hash-verified

170}
171
172func handleNpipeToMount(volume composetypes.ServiceVolumeConfig) (mount.Mount, error) {
173 result := createMountFromVolume(volume)
174
175 if volume.Source == "" {
176 return mount.Mount{}, errors.New("invalid npipe source, source cannot be empty")
177 }
178 if volume.Volume != nil {
179 return mount.Mount{}, errors.New("volume options are incompatible with type npipe")
180 }
181 if volume.Image != nil {
182 return mount.Mount{}, errors.New("image options are incompatible with type npipe")
183 }
184 if volume.Tmpfs != nil {
185 return mount.Mount{}, errors.New("tmpfs options are incompatible with type npipe")
186 }
187 if volume.Bind != nil {
188 result.BindOptions = &mount.BindOptions{
189 Propagation: mount.Propagation(volume.Bind.Propagation),
190 }
191 }
192 return result, nil
193}
194
195func handleClusterToMount(
196 volume composetypes.ServiceVolumeConfig,

Callers 1

convertVolumeToMountFunction · 0.85

Calls 1

createMountFromVolumeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…