MCPcopy
hub / github.com/containerd/containerd / WithRemappedSnapshotView

Function WithRemappedSnapshotView

client/container_opts_unix.go:52–56  ·  view source on GitHub ↗

WithRemappedSnapshotView is similar to WithRemappedSnapshot but rootfs is mounted as read-only.

(id string, i Image, uid, gid uint32)

Source from the content-addressed store, hash-verified

50
51// WithRemappedSnapshotView is similar to WithRemappedSnapshot but rootfs is mounted as read-only.
52func WithRemappedSnapshotView(id string, i Image, uid, gid uint32) NewContainerOpts {
53 uidmaps := []specs.LinuxIDMapping{{ContainerID: 0, HostID: uid, Size: 65536}}
54 gidmaps := []specs.LinuxIDMapping{{ContainerID: 0, HostID: gid, Size: 65536}}
55 return withRemappedSnapshotBase(id, i, uidmaps, gidmaps, true)
56}
57
58// WithUserNSRemappedSnapshotView is similar to WithUserNSRemappedSnapshot but rootfs is mounted as read-only.
59func WithUserNSRemappedSnapshotView(id string, i Image, uidmaps, gidmaps []specs.LinuxIDMapping) NewContainerOpts {

Callers 1

testUserNamespacesFunction · 0.85

Calls 1

withRemappedSnapshotBaseFunction · 0.85

Tested by 1

testUserNamespacesFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…