Scenario
You followed a tutorial for a development tool that requires Docker. You typed docker run and the terminal returned command not found. You checked the package manager and found podman instead. The tutorial insists on the Docker daemon. You need the actual Docker CE package to keep the workflow moving.
Install the Docker repository. The default Fedora repos do not carry the Docker daemon.
The container stack on Fedora
Fedora ships Podman as the default container engine. Podman runs containers without a background daemon and supports rootless execution out of the box. Docker CE uses a client-server architecture where a root daemon manages all containers. Installing Docker CE adds a separate repository and a background service. It does not replace Podman. Both can coexist, but they manage different socket paths and storage backends.
The Docker repository provides the latest upstream releases from Docker Inc. Fedora's default repositories focus on stability and the Podman ecosystem. Fedora deprecated the docker module in earlier releases. You cannot enable Docker via dnf module. You must add the third-party repository directly.
Docker CE is a stack of components. The docker-ce package contains the daemon. The docker-ce-cli package contains the command-line client. The containerd.io package provides the low-level container runtime. The docker-buildx-plugin and docker-compose-plugin packages add build and orchestration features. Installing all components ensures the CLI can communicate with the daemon and access all standard features.
Understand the layers before you install. Docker CE adds a daemon that runs as root and manages its own storage.
Install Docker CE
First, ensure you have the tools to manage repositories. The dnf-plugins-core package provides the config-manager command. This command modifies repository configuration files safely.
sudo dnf install -y dnf-plugins-core
# config-manager lives in this package. It handles repo file generation and validation.
Next, add the Docker repository. This tells dnf where to fetch the Docker CE packages. The repository file lands in /etc/yum.repos.d/. Files in /etc/ are user-modified. Files in /usr/lib/ ship with packages. Edit /etc/. Never edit /usr/lib/.
sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
# Downloads the repo definition. The file lands in /etc/yum.repos.d/docker-ce.repo.
Install the Docker CE packages. You need the daemon, the CLI, the container runtime, and the plugins. The containerd.io package is required for the daemon to function. The plugins provide docker buildx and docker compose commands.
sudo dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# docker-ce is the daemon. docker-ce-cli is the client. containerd.io handles low-level container lifecycle.
# Plugins add buildx and compose support. dnf resolves dependencies automatically.
Start the Docker service. The daemon must be running for the CLI to work. Enable the service so it starts on boot.
sudo systemctl start docker
# Starts the daemon immediately. It binds to /var/run/docker.sock.
sudo systemctl enable docker
# Ensures the daemon starts on boot. systemd registers the service in the default target.
Run systemctl status docker immediately. Verify the active state is active (running) before touching containers.
Verify the daemon
Test the installation by running a container. The hello-world image pulls a small test image, runs it, prints a confirmation message, and exits. This verifies that the CLI can reach the daemon, the daemon can pull images, and the runtime can execute containers.
docker run hello-world
# Pulls the test image, runs the container, prints output, and removes the container.
If the output shows "Hello from Docker", the installation is complete. If the command hangs, check your network proxy configuration.
Troubleshooting and pitfalls
Docker CE introduces a root daemon. Security and configuration issues often stem from the daemon model.
Permission denied errors. The Docker daemon socket is owned by the root user and the docker group. If you run docker commands without sudo, you will see a permission error.
Error response from daemon: permission denied while trying to connect to the Docker daemon socket
Add your user to the docker group to run commands without sudo. This grants root-equivalent access to the container runtime. Any user in the docker group can mount the host filesystem and escape container isolation. Use this group only for trusted users.
sudo usermod -aG docker $USER
# Adds the current user to the docker group. Group membership applies to new login sessions.
Log out and log back in for the group change to take effect. Run groups to verify the user is in the docker group.
SELinux denials. Docker usually handles standard mounts correctly. Custom volume paths or host file access might trigger SELinux denials. Do not disable SELinux immediately. Check the logs for the denial reason.
SELinux denials show up in journalctl -t setroubleshoot with a one-line summary. Read those before disabling SELinux. The summary often suggests a boolean or label fix.
journalctl -t setroubleshoot
# Shows SELinux denial summaries. Look for avc: denied messages related to docker.
Service conflicts. If you have both Podman and Docker installed, they do not conflict on the socket level. Podman uses ~/.local/share/containers by default. Docker uses /var/lib/docker. You can run both simultaneously. Ensure you are calling the correct binary. podman commands will not talk to the Docker daemon. docker commands will not talk to Podman.
Storage driver issues. Docker defaults to the overlay2 storage driver. This driver requires a kernel that supports overlay mounts. Modern Fedora kernels support this. If you see storage errors, check that your root filesystem supports overlay mounts. Btrfs and XFS work. Some older ext4 configurations might need tuning.
Read the journal before guessing. Run journalctl -xeu docker.service to see the actual failure reason.
Choose the right tool
Fedora provides multiple container tools. Pick the tool that matches your workflow.
Use Docker CE when your toolchain explicitly requires the Docker daemon socket or relies on Docker-specific API features. Use Podman when you want rootless containers by default and a daemonless architecture that integrates with systemd. Use Buildah when you need to build container images without a daemon or inside a CI pipeline. Stay on the default Fedora container stack if you are writing new scripts and can adapt to podman commands.
Match the tool to the requirement. Docker CE for legacy compatibility. Podman for modern rootless workflows.