Rootless containers refers to the ability for an unprivileged user to create, run and otherwise manage containers. This term also includes the variety of tooling around containers that can also be run as an unprivileged user.
“Unprivileged user” in this context refers to a user who does not have any administrative rights, and is “not in the good graces of the administrator” (in other words, they do not have the ability to ask for more privileges to be granted to them, or for software packages to be installed).
- Can mitigate potential container-breakout vulnerabilities (Not a panacea, of course)
- Friendly to shared machines, especially in HPC environments
See also Caveats and Future work.
When we say Rootless Containers, it means running the entire container runtime as well as the containers without the root privileges.
Even when the containers are running as non-root users, when the runtime is still running as the root, we don’t call them Rootless Containers.
While we allow using SETUID (and/or SETCAP) binaries for some of essential configurations
newuidmap, when the entire runtime is running with
SETUID, we don’t call it Rootless Containers.
- Docker rootless-mode
- Podman rootless-mode
- BuildKit rootless-mode
- LXC unprivileged-mode
- Singularity fakeroot-mode
Click the links for tutorials.
- Allowing a non-root user to access to
/var/run/docker.sock, by adding the user to
sudo usermod -aG docker somebody)
docker run --user somebody
- Docker userns-remap mode (
- Podman userns-remap mode (
podman run --uidmap)
- LXD unprivileged-mode
- Singularity SETUID-mode