MCPcopy
hub / github.com/containerd/containerd / WithRemappedSnapshot

Function WithRemappedSnapshot

client/container_opts_unix.go:39–43  ·  view source on GitHub ↗

WithRemappedSnapshot creates a new snapshot and remaps the uid/gid for the filesystem to be used by a container with user namespaces

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

Source from the content-addressed store, hash-verified

37// WithRemappedSnapshot creates a new snapshot and remaps the uid/gid for the
38// filesystem to be used by a container with user namespaces
39func WithRemappedSnapshot(id string, i Image, uid, gid uint32) NewContainerOpts {
40 uidmaps := []specs.LinuxIDMapping{{ContainerID: 0, HostID: uid, Size: 65536}}
41 gidmaps := []specs.LinuxIDMapping{{ContainerID: 0, HostID: gid, Size: 65536}}
42 return withRemappedSnapshotBase(id, i, uidmaps, gidmaps, false)
43}
44
45// WithUserNSRemappedSnapshot creates a new snapshot and remaps the uid/gid for the
46// filesystem to be used by a container with user namespaces

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…