

In /proc/self/uid_map and /proc/self/gid_map. In this case, Docker uses only the firstįive mappings, in accordance with the kernel’s limitation of only five entries It is possible to assign multiple subordinate ranges for a given user or groupīy adding multiple non-overlapping mappings for the same user or group in the Has no privileges on the host system at all. UID on the host, which does not even map to a real user. Outside of the namespace, the process is running as an unprivileged high-number If a process attempts to escalate privilege Namespace (within the container, in this case) as UID 0 ( root). This means that testuser is assigned a subordinate user ID range of 231072Īnd the next 65536 integers in sequence.


Consider the following entry in /etc/subuid: testuser:231072:65536 The remapping itself is handled by two files: /etc/subuid and /etc/subgid.Įach file works the same, but one is concerned with the user ID range, and the About remapping and subordinate user and group IDs UIDs from 0 to 65536, but have no privileges on the host machine itself. User is assigned a range of UIDs which function within the namespace as normal ForĬontainers whose processes must run as the root user within the container, youĬan re-map this user to a less-privileged user on the Docker host. To configure your container’s applications to run as unprivileged users. The best way to prevent privilege-escalation attacks from within a container is To system resources without the running process being aware of the limitations.įor more information on Linux namespaces, see Linux namespaces provide isolation for running processes, limiting their access
