MCPcopy Index your code
hub / github.com/containerd/containerd / WithIDMapVolumeMount

Function WithIDMapVolumeMount

integration/main_test.go:383–396  ·  view source on GitHub ↗
(hostPath, containerPath string, uidMaps, gidMaps []*runtime.IDMapping)

Source from the content-addressed store, hash-verified

381}
382
383func WithIDMapVolumeMount(hostPath, containerPath string, uidMaps, gidMaps []*runtime.IDMapping) ContainerOpts {
384 return func(c *runtime.ContainerConfig) {
385 hostPath, _ = filepath.Abs(hostPath)
386 containerPath, _ = filepath.Abs(containerPath)
387 mount := &runtime.Mount{
388 HostPath: hostPath,
389 ContainerPath: containerPath,
390 SelinuxRelabel: selinux.GetEnabled(),
391 UidMappings: uidMaps,
392 GidMappings: gidMaps,
393 }
394 c.Mounts = append(c.Mounts, mount)
395 }
396}
397
398func WithImageVolumeMount(image, imageSubPath, containerPath string) ContainerOpts {
399 return WithIDMapImageVolumeMount(image, imageSubPath, containerPath, nil, nil)

Callers 2

TestPodUserNSFunction · 0.85
WithVolumeMountFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…