diff --git a/_includes/install-script.md b/_includes/install-script.md
index 6d428402b1..d65546fd49 100644
--- a/_includes/install-script.md
+++ b/_includes/install-script.md
@@ -70,8 +70,6 @@ run Docker commands by default.
>
> To install Docker without root privileges, see
> [Run the Docker daemon as a non-root user (Rootless mode)](/engine/security/rootless/).
->
-> Rootless mode is currently available as an experimental feature.
#### Upgrade Docker after using the convenience script
diff --git a/engine/install/linux-postinstall.md b/engine/install/linux-postinstall.md
index 473b32248a..60617904a3 100644
--- a/engine/install/linux-postinstall.md
+++ b/engine/install/linux-postinstall.md
@@ -32,8 +32,6 @@ creates a Unix socket accessible by members of the `docker` group.
>
> To run Docker without root privileges, see
> [Run the Docker daemon as a non-root user (Rootless mode)](../security/rootless.md).
->
-> Rootless mode is currently available as an experimental feature.
To create the `docker` group and add your user:
diff --git a/engine/security/rootless.md b/engine/security/rootless.md
index e0645f32e7..aa534b5cdc 100644
--- a/engine/security/rootless.md
+++ b/engine/security/rootless.md
@@ -50,16 +50,25 @@ testuser:231072:65536
> Note: We recommend that you use the Ubuntu kernel.
-#### Ubuntu
+
+
- No preparation is needed.
- `overlay2` storage driver is enabled by default
([Ubuntu-specific kernel patch](https://kernel.ubuntu.com/git/ubuntu/ubuntu-bionic.git/commit/fs/overlayfs?id=3b7da90f28fe1ed4b79ef2d994c81efbc58f1144)).
- Known to work on Ubuntu 16.04, 18.04, and 20.04.
-
-#### Debian GNU/Linux
+
+
- Add `kernel.unprivileged_userns_clone=1` to `/etc/sysctl.conf` (or
`/etc/sysctl.d`) and run `sudo sysctl --system`.
@@ -67,55 +76,45 @@ testuser:231072:65536
`sudo modprobe overlay permit_mounts_in_userns=1`
([Debian-specific kernel patch, introduced in Debian 10](https://salsa.debian.org/kernel-team/linux/blob/283390e7feb21b47779b48e0c8eb0cc409d2c815/debian/patches/debian/overlayfs-permit-mounts-in-userns.patch)).
Add the configuration to `/etc/modprobe.d` for persistence.
-
-- Known to work on Debian 9 and 10.
- `overlay2` is only supported since Debian 10 and needs `modprobe`
- configuration described above.
-
-#### Arch Linux
-
+
+
- Installing `fuse-overlayfs` is recommended. Run `sudo pacman -S fuse-overlayfs`.
- Add `kernel.unprivileged_userns_clone=1` to `/etc/sysctl.conf` (or
`/etc/sysctl.d`) and run `sudo sysctl --system`
-
-#### openSUSE
-
+
+
- Installing `fuse-overlayfs` is recommended. Run `sudo zypper install -y fuse-overlayfs`.
- `sudo modprobe ip_tables iptable_mangle iptable_nat iptable_filter` is required.
This might be required on other distros as well depending on the configuration.
- Known to work on openSUSE 15.
-
-#### CentOS 8 and Fedora
-
+
+
- Installing `fuse-overlayfs` is recommended. Run `sudo dnf install -y fuse-overlayfs`.
- You might need `sudo dnf install -y iptables`.
-- Known to work on CentOS 8 and Fedora 32.
-
-#### CentOS 7
+- When SELinux is enabled, you may face `can't open lock file /run/xtables.lock: Permission denied` error.
+ A workaround for this is to `sudo dnf install -y policycoreutils-python-utils && sudo semanage permissive -a iptables_t`.
+ This issue is tracked in [moby/moby#41230](https://github.com/moby/moby/issues/41230).
+- Known to work on CentOS 8 and Fedora 33.
+
+
- Add `user.max_user_namespaces=28633` to `/etc/sysctl.conf` (or
`/etc/sysctl.d`) and run `sudo sysctl --system`.
- `systemctl --user` does not work by default.
Run `dockerd-rootless.sh` directly without systemd.
-
-- Known to work on CentOS 7.7. Older releases require additional configuration
- steps.
-
-- CentOS 7.6 and older releases require [COPR package `vbatts/shadow-utils-newxidmap`](https://copr.fedorainfracloud.org/coprs/vbatts/shadow-utils-newxidmap/) to be installed.
-
-- CentOS 7.5 and older releases require running
- `sudo grubby --update-kernel=ALL --args="user_namespace.enable=1"` and a reboot following this.
+
+
## Known limitations
- Only the following storage drivers are supported:
- - `overlay2` (only on Ubuntu and Debian 10 hosts)
+ - `overlay2` (only if running with kernel 5.11 or later, or Ubuntu-flavored kernel, or Debian-flavored kernel)
- `fuse-overlayfs` (only if running with kernel 4.18 or later, and `fuse-overlayfs` is installed)
- `vfs`
- Cgroup is supported only when running with cgroup v2 and systemd. See [Limiting resources](#limiting-resources).
@@ -131,62 +130,102 @@ testuser:231072:65536
- Host network (`docker run --net=host`) is also namespaced inside RootlessKit.
## Install
+> **Note**
+>
+> If the system-wide Docker daemon is already running, consider disabling it:
+> `$ sudo systemctl disable --now docker.service`
-The installation script is available at [https://get.docker.com/rootless](https://get.docker.com/rootless){: target="_blank" rel="noopener" class="_" }.
+
+
+
+If you installed Docker 20.10 or later with [RPM/DEB packages](/engine/install), you should have `dockerd-rootless-setuptool.sh` in `/usr/bin`.
+
+Run `dockerd-rootless-setuptool.sh install` as a non-root user to set up the daemon:
```console
-$ curl -fsSL https://get.docker.com/rootless | sh
+$ dockerd-rootless-setuptool.sh install
+[INFO] Creating /home/testuser/.config/systemd/user/docker.service
+...
+[INFO] Installed docker.service successfully.
+[INFO] To control docker.service, run: `systemctl --user (start|stop|restart) docker.service`
+[INFO] To run docker.service on system startup, run: `sudo loginctl enable-linger testuser`
+
+[INFO] Make sure the following environment variables are set (or add them to ~/.bashrc):
+
+export PATH=/usr/bin:$PATH
+export DOCKER_HOST=unix:///run/user/1000/docker.sock
```
-Make sure to run the script as a non-root user.
-To install Rootless Docker as the root user, see the [Manual installation](#manual-installation) steps.
+If `dockerd-rootless-setuptool.sh` is not present, you may need to install the `docker-ce-rootless-extras` package manually, e.g.,
-The script shows environment variables that are required:
+```console
+$ sudo apt-get install -y docker-ce-rootless-extras
+```
+
+
+If you do not have permission to run package managers like `apt-get` and `dnf`,
+consider using the installation script available at [https://get.docker.com/rootless](https://get.docker.com/rootless){: target="_blank" rel="noopener" class="_" }.
```console
$ curl -fsSL https://get.docker.com/rootless | sh
...
-# Docker binaries are installed in /home/testuser/bin
-# WARN: dockerd is not in your current PATH or pointing to /home/testuser/bin/dockerd
-# Make sure the following environment variables are set (or add them to ~/.bashrc):
+[INFO] Creating /home/testuser/.config/systemd/user/docker.service
+...
+[INFO] Installed docker.service successfully.
+[INFO] To control docker.service, run: `systemctl --user (start|stop|restart) docker.service`
+[INFO] To run docker.service on system startup, run: `sudo loginctl enable-linger testuser`
+
+[INFO] Make sure the following environment variables are set (or add them to ~/.bashrc):
export PATH=/home/testuser/bin:$PATH
-export PATH=$PATH:/sbin
-export DOCKER_HOST=unix:///run/user/1001/docker.sock
-
-#
-# To control docker service run:
-# systemctl --user (start|stop|restart) docker
-#
+export DOCKER_HOST=unix:///run/user/1000/docker.sock
```
-### Manual installation
+The binaries will be installed at `~/bin`.
+
+
-To install the binaries manually without using the installer, extract
-`docker-rootless-extras-