Installing and Setting Up Docker on Fedora
Docker provides a consistent way to package applications and their dependencies into portable containers. On Fedora, the process involves configuring Docker’s official repository, installing the engine and Compose, enabling the system service, and checking that containers can communicate correctly.
This guide suits Fedora Workstation and Fedora Server users, including administrators working on a home lab in Brisbane, a development machine in Melbourne, or a cloud instance hosted in an Australian region. The commands use dnf and assume an account with sudo access.
Check Fedora And System Requirements
Update the package metadata and apply available system updates before installing the container engine:
sudo dnf upgrade --refresh -y
Confirm the release and architecture so that repository and troubleshooting advice match the host:
cat /etc/fedora-release
uname -m
A reliable network connection is important because Docker downloads several packages and later retrieves images from registries. An NBN connection is generally sufficient for a workstation, while a server should also have accurate time, working DNS, and enough disk space for image layers.
Docker requires a 64-bit system in most practical deployments. Check available storage with df -h; container images, writable layers, logs, and build caches can grow quickly on a small virtual machine.
Remove Conflicting Container Packages
Fedora may already include Podman, Docker-compatible command packages, or older Docker components. Podman can remain installed, but mixing packages from different Docker implementations may cause confusing service or command behaviour.
List relevant packages before making changes:
rpm -qa | grep -Ei 'docker|moby|podman'
If an older Docker installation is present, remove its obsolete components carefully:
sudo dnf remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine
Do not remove Podman merely because it appears in the results. Fedora uses Podman extensively, and it can coexist with Docker when the administrator understands which command and service are being used.
Add The Official Docker Repository
Install the repository management plugin, then add Docker’s Fedora repository:
sudo dnf install -y dnf-plugins-core
sudo dnf-3 config-manager \
--add-repo https://download.docker.com/linux/fedora/docker-ce.repo
Refresh the package cache and inspect available Docker versions:
sudo dnf makecache
dnf list docker-ce --showduplicates
Using the vendor repository usually provides the current Docker Engine, command-line client, Buildx, and Compose plugin. In a business environment, test updates on a non-production host first, particularly when applications support customers across Sydney, Perth, and other Australian locations.
Repository files are configuration that should be treated as operational code. If a package installation later reports signature or repository errors, check the repository definition and system clock rather than disabling verification.
Install And Enable Docker Engine
Install the engine, client, container runtime, Buildx, and Docker Compose:
sudo dnf install -y docker-ce docker-ce-cli containerd.io \
docker-buildx-plugin docker-compose-plugin
Start Docker and configure it to launch during boot:
sudo systemctl enable --now docker
Check the unit state and recent service messages:
systemctl is-active docker
sudo systemctl --no-pager status docker
sudo journalctl -u docker -n 50 --no-pager
The daemon normally listens on its local Unix socket. Avoid exposing a TCP Docker socket without strong authentication and network controls, because access to the daemon is effectively privileged access to the host.
Verify Images And Containers
Run the standard test image to confirm that the client can reach the daemon and pull from a registry:
sudo docker run --rm hello-world
Review local images and all containers, including stopped ones:
sudo docker image ls
sudo docker container ls -a
A small interactive test demonstrates port publishing and container lifecycle management:
sudo docker run -d --name web-test -p 8080:80 nginx:alpine
curl http://127.0.0.1:8080
sudo docker stop web-test
sudo docker rm web-test
If the host uses firewalld, a published port may still need an explicit firewall rule for access from another machine. Keep internal services restricted where possible; a temporary test on localhost is safer than opening port 8080 to every network.
Configure User Access And Compose
By default, Docker commands require sudo. Add a trusted administrator to the docker group when non-root command execution is needed:
sudo usermod -aG docker "$USER"
Log out and back in, or start a new login session, then test:
docker run --rm hello-world
Membership in the Docker group grants root-equivalent control over the host, so it should be managed like privileged access. For shared servers, retaining sudo docker may provide clearer audit boundaries.
Check the Compose plugin and create a basic project directory:
docker compose version
mkdir -p ~/docker-demo
cd ~/docker-demo
Compose files can define application services, networks, volumes, and environment variables in one repeatable configuration. Developers working on Android containers may also benefit from this Jetpack Compose guide, although Android UI Compose and Docker Compose solve different problems.
Essential Commands For Daily Administration
Keep these commands available when checking a new installation:
docker ps— list running containersdocker logs container_name— read application outputdocker inspect container_name— inspect detailed metadatadocker system df— review Docker disk usage
Useful maintenance tasks include removing unused resources and checking the daemon without disrupting active workloads:
docker image prune— remove dangling imagesdocker container prune— remove stopped containersdocker volume ls— list persistent volumessudo systemctl restart docker— restart the service
Do not run broad prune commands on a production server without reviewing what will be deleted. Volumes can contain databases, uploads, and configuration that are not recoverable from an image.
Troubleshoot Networking And Service Failures
A permission denied message usually means the current shell has not picked up new group membership, or the Docker socket has incorrect ownership. Check both with id and ls -l /var/run/docker.sock, then restart the login session if required.
For failed pulls, inspect DNS, proxy settings, repository access, and daemon logs. For container ports, compare the published mapping with docker port container_name, and check whether firewalld or another service already occupies the host port.
Docker often sits behind Nginx in production. If a reverse proxy reports a 502 response, review the upstream address, container health, listening port, and application logs; this Nginx 502 troubleshooting guide provides a focused diagnostic reference. For installation-specific questions or corrections, the publication’s contact page is the appropriate place to reach the Linuxtpoint team.
A sound Fedora setup has a verified repository, an active Docker service, successful test containers, controlled user permissions, and a firewall policy that matches the application’s real network needs. The key point to remember is that installing Docker is only the first step; reliable container administration depends on verification, least privilege, storage awareness, and careful service monitoring.