How to Install Docker on Red Hat Enterprise Linux 9

Install Docker Engine on RHEL 9 x86_64 by adding Docker’s CentOS RPM repository, installing Docker CE, enabling docker.service, and running the hello-world test container. This is the practical Docker-supported package path for most RHEL 9 developer machines and servers because Docker’s native RHEL packages are limited in architecture availability. Docker Desktop and static binaries are alternatives, but they fit different use cases.

Docker Options on RHEL 9

RHEL 9 includes Podman rather than Docker Engine in its standard tooling. Podman can run many container workloads, but it is not the same daemon-based Docker Engine installation that provides dockerd, Docker contexts, and the usual Docker ecosystem behavior.

For most people who specifically need Docker, install Docker Engine from Docker’s CentOS RPM repository. RHEL and CentOS share enough package compatibility for this approach to work on typical RHEL 9 x86_64 hosts.

Choose the package route for a service host, and reserve Desktop for a workstation that can run its separate virtual machine.

How to Install Docker Engine on RHEL 9

Use this method on a RHEL 9 x86_64 system where you have sudo access and can install RPM packages.

Option Best For Important Limitation
Docker Engine RPM packages Servers, VMs, CI runners, and developer hosts Requires root access and uses Docker’s CentOS repository on typical RHEL 9 x86_64 systems
Docker Desktop A local development workstation that needs a GUI and Desktop features Runs Docker in a VM with separate images, containers, and networking
Static Docker binaries Temporary testing or constrained environments No automatic security updates; not appropriate for production

Step 1: Confirm the RHEL Release and CPU Architecture

  1. Confirm that the system is RHEL 9 before using the package commands in this guide.
rpm -E %rhel

A RHEL 9 system returns 9, confirming the release before installation.

  1. Check the CPU architecture to confirm that the host is x86_64.
uname -m

This guide is intended for the common x86_64 architecture. Docker’s RHEL package availability differs by architecture, which is why the CentOS repository is commonly used for RHEL 9 x86_64 installations.

Step 2: Check for Conflicting Container Packages

A clean Docker Engine host should not retain an existing Docker Engine installation or a Podman setup that depends on conflicting runtime packages.

  1. List any installed Docker, Podman, container runtime, or runc packages before changing the container stack.
rpm -qa | grep -E '^(docker|podman|containerd|runc)'
  1. If migrating from Podman or an older Docker installation, remove conflicting packages with the following command. Do not do this on a host that currently runs important Podman containers until you have backed up or moved those workloads.
sudo dnf remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine podman runc

This command can remove Podman-related packages. Docker Engine installs its own compatible containerd.io and runtime dependencies.

Step 3: Add Docker’s RPM Repository

  1. Install dnf-plugins-core so DNF provides the config-manager command used to add the repository.
sudo dnf -y install dnf-plugins-core
  1. Add Docker’s CentOS repository, which supplies the Docker Engine RPM packages used in this guide.
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

The repository is maintained separately from Red Hat’s own repositories. Docker’s official CentOS repository instructions use this repository path for RPM-based Docker Engine installations.

Step 4: Install Docker Engine and Docker Plugins

Install Docker Engine, the command-line client, container runtime, Buildx, and Docker Compose.

sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Review the package transaction before accepting it. DNF may ask you to import Docker’s repository signing key during installation.

Step 5: Start Docker and Run the First Test

  1. Enable and start Docker so docker.service runs now and at future system boots.
sudo systemctl enable --now docker
  1. Run Docker’s test image as root; a successful result verifies that the daemon can pull and start a container.
sudo docker run hello-world

A successful result prints a welcome message after Docker downloads the image. This confirms that the Docker daemon is running, the client can reach it, and the host has working image-pull connectivity.

Step 6: Allow Your Login User to Run Docker Commands

By default, Docker commands require sudo. Add your current user to the docker group if you want to use the Docker CLI without it.

sudo usermod -aG docker $USER

Log out of your graphical or SSH session completely, then log in again so the new group membership takes effect. Test the non-root setup:

docker run hello-world

Treat membership in the docker group as root-equivalent access. A user who can control the Docker daemon can mount host directories, run privileged containers, and gain broad control over the system.

Installing Docker on RHEL 9 With or Without a Subscription

A Red Hat subscription and Docker CE access are separate matters. Adding Docker’s repository does not require a Red Hat subscription, but RHEL itself normally needs a valid entitlement or repository access method to receive Red Hat packages, updates, and support.

If dnf can install dnf-plugins-core and resolve Docker’s dependencies, the Docker Engine package procedure can work without a paid Red Hat subscription. For example, some cloud images use their provider’s Red Hat Update Infrastructure, while individual developers may have access through a Red Hat Developer Subscription.

Docker CE and the RHEL operating system have separate maintenance lifecycles. An unpatched operating system remains a security and maintenance problem even if Docker itself installs successfully.

If you cannot access required RHEL repositories, use a properly entitled RHEL installation, a supported cloud image, or a compatible distribution intended for the environment. Avoid trying to work around missing OS updates by manually copying RPMs between systems.

Why Static Docker Binaries Are Usually the Wrong Choice

Docker provides static Linux binaries, but this route is mainly for testing and unusual environments. Static binary installations do not receive automatic security updates, and updating them requires manually replacing the binaries.

Before choosing this route, the host must have all of the following:

  • A 64-bit installation.
  • Linux kernel version 3.10 or higher.
  • iptables version 1.4 or higher.
  • Git version 1.7 or higher.
  • XZ Utils version 4.9 or higher.

For a RHEL server, Docker Engine packages are the safer long-term choice.

Use static binaries only when you have a specific testing or packaging reason, understand how you will start dockerd, and have a documented process for monitoring Docker security releases and replacing the installed binaries.

Using Docker Desktop on RHEL 9

Docker Desktop is a workstation product, not a direct substitute for installing dockerd on a server. It runs Docker inside a managed virtual machine, so images and containers created in a pre-existing Linux Docker Engine installation are not automatically available in Docker Desktop.

Before installing Docker Desktop, verify that the host meets these requirements:

  • The supported host platform is x86_64 / amd64; confirm the exact platform requirement in Docker Desktop’s Linux installation guidance.
  • The system has a 64-bit kernel and CPU virtualization support.
  • KVM virtualization support is available.
  • The host uses systemd.
  • QEMU is version 5.2 or later.
  • The host has at least 4 GB of RAM.

Check whether the KVM device exists:

ls -al /dev/kvm

Check the installed QEMU version:

qemu-system-x86_64 --version

If /dev/kvm is present but your login user cannot access it, add the user to the kvm group.

sudo usermod -aG kvm $USER

Log out and back in after changing group membership.

Download the current Docker Desktop RPM for RHEL from Docker’s Desktop installation page, place it in an otherwise empty directory, and install it with DNF:

sudo dnf install ./docker-desktop-*.rpm

Start Docker Desktop for your user account:

systemctl --user start docker-desktop

Select Docker Desktop’s context and test it:

docker context use desktop-linux
docker run hello-world

If Docker Engine is already running on the same host and you plan to use Docker Desktop instead, stop the system Docker service first to avoid port conflicts:

sudo systemctl stop docker docker.socket containerd

Commercial Docker Desktop use in an organization with more than 250 employees or more than $10 million USD in annual revenue requires a paid Docker subscription. That threshold applies to Docker Desktop, not to Docker Engine installed from RPM packages.

Verify Docker and Fix Common Problems

After installation, verify that the Docker daemon is active:

systemctl is-active docker

For a Docker Engine installation, the expected result is active.

Check both the Docker client and server versions:

docker version

Verify that the Compose plugin was installed:

docker compose version

Docker Cannot Connect to the Daemon

If the Docker CLI returns a message similar to “Cannot connect to the Docker daemon,” first check whether the service is running:

sudo systemctl status docker --no-pager

Start it if it is stopped:

sudo systemctl start docker

If you installed Docker Desktop instead of Docker Engine, check its per-user service:

systemctl --user status docker-desktop --no-pager

Docker Desktop uses a user-level socket and context, while Docker Engine normally uses the system daemon socket.

Docker Permission Denied Errors

If Docker works with sudo but fails without it, your current terminal session probably has not picked up the docker group membership.

Confirm the groups for the current session:

id -nG

Log out and log back in if docker does not appear. Do not solve the issue by making /var/run/docker.sock world-writable; that exposes Docker daemon control to every local user.

I reproduce one problem at a time in a clean container because it removes machine-specific noise from the test.

Frequently Asked Questions

Does RHEL 9 Support Docker?

Yes, RHEL 9 can run Docker Engine, but Docker’s RPM packaging availability differs by architecture. On a typical RHEL 9 x86_64 host, using Docker’s CentOS RPM repository is the practical installation path for Docker CE.

RHEL also supports Podman as part of its own container tooling. Choose Docker Engine when your project, CI environment, or team tooling specifically requires Docker behavior and the dockerd daemon.

Can I Install Docker on RHEL 9 Without a Red Hat Subscription?

You can install Docker CE without a paid Red Hat subscription if the host can access the packages needed by DNF and Docker’s repository. Docker’s repository is separate from Red Hat entitlement services.

However, a RHEL 9 system without valid update access will not receive normal Red Hat security updates. Use a valid entitlement, a supported cloud image, or a development subscription rather than leaving the operating system unpatched.

Is Podman a Replacement for Docker on RHEL 9?

Podman can run OCI-compatible containers and is often sufficient for local development, automation, and server workloads. It is daemonless, whereas Docker Engine uses the dockerd service.

The podman-docker compatibility package can make many docker commands invoke Podman, but it does not make every Docker feature, plugin, socket integration, or networking behavior identical. Install Docker Engine when an application explicitly depends on Docker.

Why Does Docker Desktop Not Show My Existing Docker Images?

Docker Desktop for Linux stores containers and images inside its own managed VM. A Docker Engine installation uses the host’s Docker daemon and storage, so the two environments do not share images or containers automatically.

Export and import images when you need to move them, or choose one container runtime environment for a particular development workflow.

What Should I Do After hello-world Works?

Start with a small project that has a Dockerfile or compose.yaml, then build and run it using the installed Docker Engine and Compose plugin. Keep containers, volumes, and application configuration in project files so the environment can be recreated consistently on another RHEL 9 host.