You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 15, 2026. It is now read-only.
As discussed lately in #3, oci-unpack could also be handling UID/GID translation to prepare the unpacked image (rootfs) for a container that uses a user namespace with UID/GID mappings. There are, so far, the following use cases:
Multiple mappings: the UID/GIDs defined in the tar-ball need to be translated accordingly.
Single mapped user (host user X): all the files and directories of the rootfs are owned by X.
Mapped users are less than the users defined in the tar-ball (by @cyphar)
I would propose extiending the oci-unpack interface by adding:
*--uid-mapping <Namespace UID>:<Host UID>:<Size> (similar to the /proc/$PID/uid_map structure). It can be provided multiple times.
--gid-mapping which handles the GID mappings similarly.
--fallback-uid <Namespace UID> When provided, if a tar entry UID is not mapped the unpacked file will be owned by <Namespace UID>. If the flag is not provided and a unmapped UID is encountered, oci-unpack should fail.
Grootfs is implementing the --uid-mapping and --gid-mapping flags but I would prefer this translation logic to live in oci-unpack.
As discussed lately in #3,
oci-unpackcould also be handling UID/GID translation to prepare the unpacked image (rootfs) for a container that uses a user namespace with UID/GID mappings. There are, so far, the following use cases:I would propose extiending the
oci-unpackinterface by adding:*
--uid-mapping <Namespace UID>:<Host UID>:<Size>(similar to the/proc/$PID/uid_mapstructure). It can be provided multiple times.--gid-mappingwhich handles the GID mappings similarly.--fallback-uid <Namespace UID>When provided, if a tar entry UID is not mapped the unpacked file will be owned by<Namespace UID>. If the flag is not provided and a unmapped UID is encountered,oci-unpackshould fail.Grootfs is implementing the
--uid-mappingand--gid-mappingflags but I would prefer this translation logic to live inoci-unpack.