install docker linux still ranks poorly for enterprise RPM distros — this page is the AlmaLinux/Rocky path. Ubuntu/Debian: Docker quick start Ubuntu; full compare: Docker on AlmaLinux & Ubuntu.
Remove conflicts
Old podman-docker shim or distro docker packages can block CE.
bashclean
sudo dnf remove -y docker docker-client docker-common podman-docker 2>/dev/null; true

Add Docker repo
Use Docker’s official docker-ce repo for your major version.
bashrepo
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

Install and start
Engine + CLI + compose plugin in one go.
bashinstall
sudo dnf install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
sudo systemctl enable --now docker

Verify
Non-root optional; prefer rootless/podman for untrusted multi-tenant hosts.
bashtest
sudo docker run --rm hello-world
sudo docker version

Quick Reference
- Compose: Docker Compose on Linux
- Rootless alt: Podman vs Docker
Related tutorials
Diagrams are original illustrations by Gnome IT Solutions. Tutorial text © Gnome IT Solutions.