Not in the sense most people hope. Docker's installation guide warns that membership in the docker group grants root level privileges. Treat adding a user as granting them root on that machine. On shared hosts and CI runners, consider rootless mode or a virtual machine instead.
Why the group equals root
The Docker daemon always runs as root unless you use rootless mode. It listens on a Unix socket that members of the docker group can use. Anyone who can talk to the daemon can ask it to start containers with whatever settings they choose.
Docker's security page spells out the mechanism. Docker allows you to share a directory between the host and a container without limiting the container's access rights. You can start a container where a directory is the host's root directory, and the container can then alter the host filesystem. The page concludes that only trusted users should be allowed to control the Docker daemon.
A single command can mount the host's root directory and give the user a root shell over it. That is why the post install guide's warning is blunt.
The group password idea
The post install guide describes an alternative for single user workstations: keep your user out of the group, set a group password and use a command to start a Docker enabled shell on demand. The same guide then qualifies it. A group password reduces ambient access to the socket, but does not reduce the root level privileges granted after access is authorized. Group passwords are shared secrets and give no per user accountability. The guide says the method is not a security boundary against malicious code running as your user, because such code can modify shell configuration or scripts you later use and gain access after you authenticate.
It adds that for stronger isolation you should use rootless mode or run Docker in a virtual machine.
Options compared
| Option | What it gives | Remaining risk |
|---|---|---|
| docker group | Convenience, no sudo | Members have root level privileges |
| sudo for each command | Prompts and logs per use | Still root once authorized |
| Group password shell | Less ambient access | Not a boundary against code running as you |
| Rootless mode | Daemon and containers without root | Setup prerequisites and some feature limits |
| Docker inside a VM | Separates the daemon from the host | A VM to maintain |
What this means for teams
- Developer laptops. Membership is common and mostly a convenience. Accept the risk knowingly and keep the laptop patched.
- Shared servers. Do not add untrusted users. Give each person a rootless setup or a VM.
- CI runners. A job that can reach the daemon controls the runner host. Isolate runners and prefer daemonless or rootless builds. See Docker in Docker, socket binding and daemonless builds.
- Containers that need Docker access. Mounting the socket has the same effect, as covered in why the socket mount is root.
A quick audit
- List the members of the docker group on each host.
- Remove anyone who does not need it today.
- Check whether any service account is in the group.
- Move shared or untrusted use cases to rootless or a VM.
Rootless setup steps are in rootless Docker prerequisites.
Safeguard can inventory the assets and dependencies on your build hosts, with a free scan at gold.safeguard.sh/scan.
Quick check
Is a user in the docker group the same as a sudoer?
For practical purposes the privileges are equivalent, because the daemon runs as root and the user can direct it to access the host filesystem.
Does rootless mode remove the problem?
It removes the root daemon, so a user controlling it gets only their own privileges. It has its own prerequisites and limits.
Sources
- Linux post installation steps for Docker Engine, Docker Docs
- Docker security, Docker Docs
- Rootless mode, Docker Docs
Last reviewed: 19 October 2026.