zulip/docs/development/setup/install-docker.md
apoorvapendse a6bea22059 setup_docs: Use the usermod command for docker.
The Docker documentation[1] recommends using the
`usermod` command for adding a user to the `docker`
group.

The previous `adduser` command only worked for
Debian-based systems and is symlinked to
`useradd` on my Fedora 43 by default.

I also add the step to create the `docker` group
which wasn't present previously and is a pre-req
for adding $USER to the `docker` group.

[1]: https://docs.docker.com/engine/install/linux-postinstall/
Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
2026-02-17 21:12:56 -05:00

42 lines
1.3 KiB
Markdown

##### 2. Create the `docker` group and add yourself to it:
```console
$ sudo groupadd docker
$ sudo usermod -aG docker $USER
```
You will need to log out and log back in (or reboot) for this change to take effect.
If it worked, you will see `docker` in your list of groups:
```console
$ groups | grep docker
YOURUSERNAME adm cdrom sudo dip plugdev lpadmin sambashare docker
```
##### 3. Make sure the Docker daemon is running
Docker runs as a background service (daemon), which must be running for Docker commands to work.
If you had previously installed and removed an older version of
Docker, an [Ubuntu
bug](https://bugs.launchpad.net/ubuntu/+source/docker.io/+bug/1844894)
may prevent Docker from being automatically enabled and started after
installation. You can check using the following:
```console
$ systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2019-07-15 23:20:46 IST; 18min ago
```
If the service is not running, you'll see `Active: inactive (dead)` on
the second line, and will need to enable and start the Docker service
using the following:
```console
$ sudo systemctl unmask docker
$ sudo systemctl enable docker
$ sudo systemctl start docker
```