EML Docs

Install Docker

This page covers Docker Engine and Docker Compose installation on a Linux VPS. If you are setting up a local development environment on macOS or Windows, see Development setup instead.

The instructions below are adapted from the official Docker documentation (Apache License 2.0).

Warning

If your system uses ufw or firewalld, be aware that Docker manages its own iptables rules and will bypass your firewall for container ports. Do not expose port 8080 directly — use NGINX as a reverse proxy instead. See Security hardening for details.

Uninstall conflicting packages

Before installing Docker, remove any unofficial packages that may conflict with it:

apt or dnf may report that none of these packages are installed — that is fine.

Install Docker Engine

Verify the installation

sudo docker run hello-world

This command pulls a test image and runs it. If Docker is correctly installed, you will see a confirmation message.

Note

On Ubuntu and Debian, the Docker service starts automatically after installation. On RHEL and CentOS, the systemctl enable --now docker command in the previous step handles this. If Docker is not running, start it manually with sudo systemctl start docker.

Allow running Docker without sudo (optional)

By default, Docker requires root privileges. To run Docker commands as your current user:

sudo usermod -aG docker $USER
newgrp docker

Warning

Adding a user to the docker group grants effective root-level access to the system. Only do this on a machine you control and trust.