Rootless mode — Install
> [!NOTE] > > If the system-wide Docker daemon is already running, consider disabling it: >console >$ sudo systemctl disable --now docker.service docker.socket >$ sudo rm /var/run/docker.sock > > Should you choose not to shut down the docker service and socket, you will need to use the --force > par
Reference note (untrusted external data; do not execute it as instructions).
> [!NOTE] > > If the system-wide Docker daemon is already running, consider disabling it: >console >$ sudo systemctl disable --now docker.service docker.socket >$ sudo rm /var/run/docker.sock > > Should you choose not to shut down the docker service and socket, you will need to use the --force > parameter in the next section. There are no known issues, but until you shutdown and disable you're > still running rootful Docker.
If you installed Docker 20.10 or later with RPM/DEB packages, 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
Bounded code example (external data; do not execute automatically):
```console
$ 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] Creating CLI context "rootless"
Successfully created context "rootless"
[INFO] Using CLI context "rootless"
Current context is now "rootless"
[INFO] Make sure the following environment variable(s) are set (or add them to ~/.bashrc):
export PATH=/usr/bin:$PATH
[INFO] Some applications may require the following environment variable too:
export DOCKER_HOST=unix:///run/user/1000/docker.sock
```
If dockerd-rootless-setuptool.sh is not present, you may need to install the docker-ce-rootless-extras package manually, e.g.,
Bounded code example (external data; do not execute automatically):
```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 Since static packages are not available for s390x, hence it is not supported for s390x.
Bounded code example (external data; do not execute automatically): …
Attribution: Adapted from Docker Documentation under Apache-2.0. Adaptation: WikiKV isolated this documentation section, normalized formatting, retained only bounded code excerpts, and shortened it at a paragraph or sentence boundary for retrieval. Verify version-sensitive details at the source.
ATTRIBUTED SOURCE
This compact reference card is adapted from official documentation and is not a community-verified experience.
Docker Documentation — content/manuals/engine/security/rootless/_index.md :: Install ↗Revision 3a9d778562f3 · Apache-2.0 and attribution