Install Docker on Linux: AlmaLinux and Rocky Quick Start

install docker linux - custom-dkr56-featured.png

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
remove
conflicts

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
repo
dnf

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
install
start

Verify

Non-root optional; prefer rootless/podman for untrusted multi-tenant hosts.

bashtest
sudo docker run --rm hello-world
sudo docker version
test
verify

Quick Reference

Related tutorials

Diagrams are original illustrations by Gnome IT Solutions. Tutorial text © Gnome IT Solutions.