| Tested on | Red Hat Enterprise Linux 10.2 (Coughlan) |
|---|---|
| Package | docker-ce-3:29.8.0-1.el10.x86_64containerd.io-2.3.5-1.el10.x86_64docker-compose-plugin-5.5.1-1.el10.x86_64 |
| Applies to | RHEL 8, 9, and 10. Rocky Linux and AlmaLinux may also work with these steps, but Docker does not officially test or verify RHEL derivatives. |
| Privilege | sudo or root |
| Scope | Add Docker's official DNF repository, install docker-ce with Compose V2 and Buildx, enable docker.service, run hello-world, grant the docker group, upgrade packages, and remove Docker CE — not Podman-only workflows or rootless Docker setup |
| Related guides | Install Docker on Debian Install Keycloak with Docker Manage Docker containers with examples docker ps -a Find and remove unused Docker containers |
Docker Engine runs containers through the dockerd daemon, while the docker command is the CLI you use to communicate with it. Docker also installs containerd as part of its runtime stack.
This guide installs Docker Engine Community (Docker CE). The docker-ce package provides the Docker Engine daemon, while docker-ce-cli provides the docker command. On RHEL, Docker documents installation of Docker Engine from Docker's official DNF repository at download.docker.com/linux/rhel.
In this article we will add that repository, install Engine with the Compose V2 and Buildx plugins, start the service, and verify the install with hello-world. The walkthrough is tested and documented for RHEL. RHEL-compatible derivatives may also work with Docker's RHEL repository, but treat those as derivative compatibility rather than officially tested Docker platforms.
Choose an install method
| Method | Best for | Notes |
|---|---|---|
| Official Docker CE DNF repository | Servers, CI runners, Compose projects, current docs | Installs docker-ce, Buildx, and Compose V2 plugin — recommended |
Convenience script (get.docker.com) |
Quick development/test VMs | Requires root/sudo; not recommended for production; installs latest stable without custom repo steps |
Most readers should use the official repository. The walkthrough below follows Docker's supported DNF path for RHEL 8, 9, and 10.
Prerequisites
- RHEL 8, 9, or 10 on a platform Docker publishes for RHEL.
- sudo or root access and outbound HTTPS to
download.docker.com. - Enough disk under
/var/lib/docker/for images and container layers.
Confirm the major version and architecture before adding the repository:
. /etc/os-release && printf '%s (release %s)\n' "$PRETTY_NAME" "$VERSION_ID"
uname -mOn the test host:
Red Hat Enterprise Linux 10.2 (Coughlan) (release 10.2)
x86_64Install dnf-plugins-core, which provides dnf config-manager for adding the Docker repository:
sudo dnf install -y dnf-plugins-coreThe package name confirms the plugin stack is present:
rpm -q dnf-plugins-corednf-plugins-core-4.7.0-10.el10.noarchFor broader package-manager reference beyond these steps, see the dnf command cheat sheet.
Remove conflicting packages
RHEL may have Podman, runc, or older/unofficial Docker packages installed that conflict with Docker CE. Remove conflicting packages before installing Docker CE from Docker's repository.
Check before continuing: this command can remove an existing Podman installation. If the host already uses Podman, review its containers and dependent workflows before removing packages. On a new Docker-only host, continue with the command below.
sudo dnf remove -y docker docker-client docker-client-latest docker-common \
docker-latest docker-latest-logrotate docker-logrotate docker-engine \
podman runcdnf may report that none of those packages are installed. That is fine on a clean host.
Removing packages does not delete existing data under /var/lib/docker/ unless you purge volumes separately later.
Install Docker CE from the official repository
Add Docker's stable repository for RHEL. The repo file uses $releasever, so RHEL 10 hosts pull .el10 packages automatically:
sudo dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repoList enabled repositories to confirm docker-ce-stable appears:
dnf repolist docker-ce-stablerepo id repo name
docker-ce-stable Docker CE Stable - x86_64Check which docker-ce build DNF would install:
dnf list docker-ce --showduplicates | tail -5Example repository output at the time of testing:
docker-ce.x86_64 3:29.7.2-1.el10 docker-ce-stable
docker-ce.x86_64 3:29.8.0-1.el10 docker-ce-stable
docker-ce.x86_64 3:29.8.1-1.el10 docker-ce-stableThe command also installs two commonly used Docker plugins: Buildx for building container images and Compose V2 for managing multi-container applications with docker compose.
Now install Docker Engine, the docker CLI, Docker's containerd.io runtime package, and the Buildx and Compose plugins:
sudo dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-pluginIf DNF prompts to accept the Docker GPG key, verify the fingerprint matches Docker's published key (060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35) before you accept.
Installed versions on the test host:
containerd.io-2.3.5-1.el10.x86_64
docker-buildx-plugin-0.37.1-1.el10.x86_64
docker-ce-29.8.0-1.el10.x86_64
docker-ce-cli-29.8.0-1.el10.x86_64
docker-compose-plugin-5.5.1-1.el10.x86_64Enable and start Docker
On RPM-based systems, installing the packages does not start the daemon automatically. Enable Docker to start automatically at boot and start it immediately with the same command:
sudo systemctl enable --now docker.serviceenable configures Docker to start on future boots, while --now starts the service immediately.
Confirm the unit is active with the systemctl command:
systemctl is-active docker.service
docker --version
docker compose versionactive
Docker version 29.8.0, build 88096ef
Docker Compose version v5.5.1active means the Docker daemon is running and ready for docker run.
Verify with hello-world
Pull and run Docker's test image:
sudo docker run --rm hello-worldWhen Docker Hub is reachable, the tail of the output includes:
Hello from Docker!
This message shows that your installation appears to be working correctly.This verifies the basic Docker path end to end: the CLI can reach the daemon, Docker can pull an image, and the daemon can create and run a container.
Optional: run Docker without sudo
The install creates a docker group. Adding your user to that group is optional — Docker works with sudo docker without any group change. Members of the docker group can talk to the rootful daemon socket without prefixing every command with sudo:
sudo usermod -aG docker "$USER"
newgrp docker
docker psLog out and back in on graphical sessions so the group change applies everywhere.
docker group can mount host paths and effectively control the system through the daemon. Add only trusted accounts. For stronger isolation on workstations, see Docker rootless mode.
Upgrade Docker CE
Install the latest builds from the enabled repository:
sudo dnf upgrade -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-pluginList available versions before pinning a specific NEVRA:
dnf list docker-ce --showduplicatesInstall a pinned version by passing the full package name from the version column DNF shows, for example docker-ce-3:29.8.0-1.el10, when a project requires a fixed Engine release.
Uninstall Docker CE
Stop the daemon and remove the Docker CE packages:
sudo systemctl disable --now docker.service 2>/dev/null || true
sudo dnf remove -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extrasRemove the repository file if you will not reinstall from Docker's repo:
sudo rm -f /etc/yum.repos.d/docker-ce.repo
sudo dnf clean allRemoving the RPM packages does not delete local runtime data. Optional destructive cleanup — only when you deliberately want to wipe all local images, containers, and volumes:
sudo rm -rf /var/lib/docker
sudo rm -rf /var/lib/containerdBack up named volumes first. This is not part of a normal package uninstall.
Confirm removal:
rpm -q docker-ce 2>&1 || echo 'docker-ce package removed'
command -v docker || echo 'docker command not found'Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
No match for argument: docker-ce |
Wrong repo URL or unsupported $releasever |
Use linux/rhel/docker-ce.repo; confirm RHEL major version is 8, 9, or 10 |
Transaction conflicts with podman |
Old container stack still installed | Run the Remove conflicting packages step, then retry dnf install |
permission denied on /var/run/docker.sock |
User not in docker group, or daemon not reachable |
Run Docker with sudo, or if you intentionally want non-root CLI access, add your trusted user to the docker group as shown above |
Cannot connect to the Docker daemon |
Service not started | sudo systemctl enable --now docker.service |
docker compose not found |
Compose V1 only or plugin missing | Install docker-compose-plugin; use docker compose with a space |
| TLS or certificate error pulling images | Proxy, custom CA, certificate interception, or network issue | Check the exact daemon error and your organization's Docker/CA configuration; do not disable TLS verification as a general fix |
References
- Install Docker Engine on RHEL — official repository setup and package list
- Docker Compose plugin — Compose V2 via
docker-compose-plugin - Linux post-installation steps for Docker Engine —
dockergroup and daemon tuning - Docker rootless mode — optional non-root daemon
Summary
For current Docker Engine, Buildx, and Compose V2 on RHEL, add Docker's linux/rhel DNF repository, install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin, and run sudo systemctl enable --now docker.service. Verify with sudo docker run --rm hello-world, then add trusted users to the docker group only when you accept the security trade-off.
Remove conflicting podman or legacy docker RPMs before the install when they block the transaction, and use dnf upgrade to move forward on routine maintenance. Podman-only container workflows are out of scope here — this guide installs Docker CE the way Docker documents for RHEL 8, 9, and 10.
Frequently Asked Questions
Can I use these steps on Rocky Linux or AlmaLinux?
Often, but Docker does not officially test or verify installation instructions on RHEL derivatives. If you use Docker's RHEL repository on Rocky Linux or AlmaLinux, verify package availability for your release before installing. For officially documented platforms, use Docker's supported-platform list for RHEL 8, 9, and 10.
What is the difference between Docker CE and Podman on RHEL?
Docker CE uses the Docker daemon and docker CLI, while Podman is a daemonless container engine provided in RHEL repositories. This guide specifically installs Docker CE.
Should I use docker-compose or docker compose on RHEL?
Use docker compose with a space and the docker-compose-plugin package. That is Compose V2. The standalone docker-compose binary is the legacy V1 tool.
Why does Docker say permission denied on /var/run/docker.sock?
Your user is not in the docker group, or you have not started a new login session after usermod -aG docker. Run newgrp docker for the current shell, or prefix commands with sudo docker until you re-login.
How do I update Docker CE on RHEL?
Run sudo dnf upgrade docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin after sudo dnf check-update, or install a specific NEVRA from dnf list docker-ce --showduplicates.
Does uninstalling Docker delete my containers and images?
Removing the RPM packages stops the daemon but leaves data under /var/lib/docker/ and /var/lib/containerd/ until you delete those directories manually. Back up anything you need before optional destructive cleanup.

