Skip to content
Blog

Deploying Docker Engine on Fedora and RHEL 9: Enterprise Setup

Configuring DNF repositories, handling SELinux policies, installing docker-ce, containerd, configuring cgroups v2, and firewalld rules.

Published on • October 24, 2026

AI Assistant

Enterprise Linux environments based on Red Hat Enterprise Linux (RHEL 9) and Fedora utilize dnf for package management, firewalld for networking, and SELinux in enforcing mode for security. Installing official Docker Engine (docker-ce) on RHEL/Fedora requires properly configuring SELinux permissions and repository dependencies.

In this guide, we walk through installing Docker Engine on Fedora and RHEL 9.

Step 1: Remove Conflicting Container Packages

RHEL ships Podman and podman-docker by default. Remove conflicting packages before installing Docker Engine:

sudo dnf remove -y podman-docker docker buildah

Step 2: Configure Docker DNF Repository

Install dnf-plugins-core and add Docker’s official RPM repository:

sudo dnf install -y dnf-plugins-core

# For RHEL 9
sudo dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo

# For Fedora
sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo

Step 3: Install Docker Engine & Containerd

Install docker-ce, docker-ce-cli, containerd.io, and Docker Compose plugin:

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

Step 4: SELinux & Systemd Service Configuration

On RHEL 9 and Fedora, SELinux prevents unprivileged container mounts unless container policies are applied. Ensure container-selinux is enabled:

sudo dnf install -y container-selinux

# Start and enable Docker service via systemctl
sudo systemctl enable --now docker

To run Docker commands without sudo:

sudo usermod -aG docker $USER
newgrp docker

Step 5: Verification & Firewall Setup

If using firewalld, allow container network traffic across docker0 interface:

sudo firewall-cmd --zone=trusted --add-interface=docker0 --permanent
sudo firewall-cmd --reload

# Test container execution
docker run --rm alpine uname -a

Conclusion

Docker Engine is now fully operational on your RHEL 9 or Fedora server with enterprise SELinux and firewalld protection.

References & Further Reading