@@ -20,29 +20,16 @@ with `userns-remap` mode, the daemon itself is running with root privileges,
2020whereas in rootless mode, both the daemon and the container are running without
2121root privileges.
2222
23- The two modes also differ in how they map container UIDs and GIDs to the host:
24-
25- - In ` userns-remap ` mode, container UID ` 0 ` is mapped to the first subordinate
26- UID listed in ` /etc/subuid ` for the remap user, and container UID ` n ` is
27- mapped to ` subuid + n ` .
28- - In rootless mode, container UID ` 0 ` is mapped to the host UID of the user
29- running rootless Docker (the result of ` id -u ` ); container UID ` n ` (for
30- ` n >= 1 ` ) is mapped to ` subuid + (n - 1) ` .
31-
32- GIDs follow the same rules using ` /etc/subgid ` .
33-
34- This difference matters when setting file permissions on bind-mounted
35- directories: in rootless mode, files owned by your host user appear as owned
36- by ` root ` inside the container.
23+ The two modes also differ in how they map container UIDs and GIDs to the
24+ host: see [ UID/GID mapping] ( uid-gid-mapping/ ) for details.
3725
3826Rootless mode does not use binaries with ` SETUID ` bits or file capabilities,
3927except ` newuidmap ` and ` newgidmap ` , which are needed to allow multiple
4028UIDs/GIDs to be used in the user namespace.
4129
42-
4330## Prerequisites
4431
45- - You must install ` newuidmap ` and ` newgidmap ` on the host. These commands
32+ - You must install ` newuidmap ` and ` newgidmap ` on the host. These commands
4633 are provided by the ` uidmap ` package on most distributions.
4734
4835- ` /etc/subuid ` and ` /etc/subgid ` should contain at least 65,536 subordinate
@@ -68,13 +55,15 @@ when the prerequisites are not satisfied.
6855> [ !NOTE]
6956>
7057> If the system-wide Docker daemon is already running, consider disabling it:
71- > ``` console
72- >$ sudo systemctl disable --now docker.service docker.socket
73- >$ sudo rm /var/run/docker.sock
74- >```
58+ >
59+ > ``` console
60+ > $ sudo systemctl disable --now docker.service docker.socket
61+ > $ sudo rm /var/run/docker.sock
62+ > ` ` `
63+ >
7564> Should you choose not to shut down the ` docker` service and socket, you will need to use the ` --force`
7665> parameter in the next section. There are no known issues, but until you shutdown and disable you' re
77- > still running rootful Docker.
66+ > still running rootful Docker.
7867
7968{{< tabs >}}
8069{{< tab name="With packages (RPM/DEB)" >}}
@@ -143,6 +132,7 @@ The binaries will be installed at `~/bin`.
143132{{< /tabs >}}
144133
145134Run ` docker info ` to confirm that the ` docker ` client is connecting to the Rootless daemon:
135+
146136``` console
147137$ docker info
148138Client: Docker Engine - Community
@@ -159,4 +149,4 @@ Server:
159149...
160150```
161151
162- See [ Troubleshooting] ( ./troubleshoot.md ) if you faced an error.
152+ See [ Troubleshooting] ( ./troubleshoot.md ) if you faced an error.
0 commit comments