(hostPath, containerPath string, uidMaps, gidMaps []*runtime.IDMapping)
| 381 | } |
| 382 | |
| 383 | func 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 | |
| 398 | func WithImageVolumeMount(image, imageSubPath, containerPath string) ContainerOpts { |
| 399 | return WithIDMapImageVolumeMount(image, imageSubPath, containerPath, nil, nil) |
no outgoing calls
no test coverage detected
searching dependent graphs…