Welcome to our guide on how to install Docker on Fedora 30 / Fedora 29 / Fedora 28. The release of Docker we’ll install is Docker Community Edition (CE). Docker is a leading container runtime engine that allows you to package your applications with all of its dependencies into a standardized unit for software development.

Follow the steps below to have the latest release of Docker installed on your Fedora 29.

Step 1: Update your system

We always start our installations by updating and upgrading OS packages. On Fedora, this can be easily done by running the command:

sudo dnf -y update

It is recommended to reboot your system after an upgrade

sudo reboot

Step 2: Add the Docker repository to Fedora 29/28

After upgrading system packages and rebooting the server, proceed to add Fedora repository to your system

sudo dnf -y install dnf-plugins-core

This command will set up the stable Docker repository.

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

Optional: Enable the nightly or test repositories.

The nightly and test channels are disabled by default. You can enable them as shown below.

The following command enables the nightly repository.

sudo dnf config-manager --set-enabled docker-ce-nightly

To enable the test channel, run the following command:

sudo dnf config-manager --set-enabled docker-ce-test

To disable them, replace --set-enabled flag with --set-disabled.

Step 3: Install the latest Docker Engine on Fedora 30/29/28

Now that you have your repository ready, install the latest stable release of Docker on your machine by running:

sudo dnf install docker-ce docker-ce-cli containerd.io

Docker will be installed but not started. To start the docker service, run:

sudo systemctl enable --now docker

You can check status with:

$ sudo systemctl status  docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2019-03-10 06:28:23 UTC; 9s ago
Docs: https://docs.docker.com
Main PID: 11771 (dockerd)
Tasks: 8
Memory: 30.4M
CGroup: /system.slice/docker.service
└─11771 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
Mar 10 06:28:23 fed29 dockerd[11771]: time="2019-03-10T06:28:23.077345966Z" level=info msg="Graph migration to content-addressability took 0.00 second>
Mar 10 06:28:23 fed29 dockerd[11771]: time="2019-03-10T06:28:23.078990560Z" level=warning msg="Your kernel does not support cgroup rt period"
Mar 10 06:28:23 fed29 dockerd[11771]: time="2019-03-10T06:28:23.079189297Z" level=warning msg="Your kernel does not support cgroup rt runtime"
Mar 10 06:28:23 fed29 dockerd[11771]: time="2019-03-10T06:28:23.080348031Z" level=info msg="Loading containers: start."
Mar 10 06:28:23 fed29 dockerd[11771]: time="2019-03-10T06:28:23.267922830Z" level=info msg="Default bridge (docker0) is assigned with an IP address 17>
Mar 10 06:28:23 fed29 dockerd[11771]: time="2019-03-10T06:28:23.379401688Z" level=info msg="Loading containers: done."
Mar 10 06:28:23 fed29 dockerd[11771]: time="2019-03-10T06:28:23.425395112Z" level=info msg="Docker daemon" commit=774a1f4 graphdriver(s)=overlay2 vers>
Mar 10 06:28:23 fed29 dockerd[11771]: time="2019-03-10T06:28:23.425557563Z" level=info msg="Daemon has completed initialization"
Mar 10 06:28:23 fed29 systemd[1]: Started Docker Application Container Engine.
Mar 10 06:28:23 fed29 dockerd[11771]: time="2019-03-10T06:28:23.493653902Z" level=info msg="API listen on /var/run/docker.sock"

The docker group is created, but no users are added to the group. Add your user to this group to run docker commands without sudo.

sudo usermod -aG docker $(whoami)

Logout and Login again to use Docker without sudo. The version of Docker installed can be checked with:

$ docker version
Client:
 Version:           18.09.3
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        774a1f4
 Built:             Thu Feb 28 06:34:10 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.3
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.8
  Git commit:       774a1f4
  Built:            Thu Feb 28 06:02:24 2019
  OS/Arch:          linux/amd64
  Experimental:     false

This shows both Client and Engine versions.

Step 4: Pull Test docker image

The last step is to test your installation by downloading a test docker container.

$ docker pull alpine
Using default tag: latest
latest: Pulling from library/alpine
8e402f1a9c57: Pull complete 
Digest: sha256:644fcb1a676b5165371437feaa922943aaf7afcfa8bfee4472f6860aad1ef2a0
Status: Downloaded newer image for alpine:latest

Verify that Docker CE is installed correctly by running the alpine image.

$ docker run -it --rm alpine /bin/sh
/ # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
v3.9.2-1-g592d872fb8 [http://dl-cdn.alpinelinux.org/alpine/v3.9/main]
v3.9.2-2-ge7dc3349a9 [http://dl-cdn.alpinelinux.org/alpine/v3.9/community]
OK: 9754 distinct packages available
/ # exit

That’s all. You now have Docker running on your Fedora system. The next reading is:

Install and Use Docker Compose on Fedora

To setup a Docker registry, check our guide on how to Install and Use Docker Registry on Fedora.

Please check our guide on managing Docker containers through a web interface:

Install Docker UI manager – Portainer

For easy monitoring, you can use Ctop – Top command for container metrics

For installation of Docker on other systems, use:

How to install Docker CE on Ubuntu / Debian / Fedora / Arch / CentOS

Don’t forget to check other Fedora articles available on our website.

How to Install Apache Tomcat 9 on CentOS 7 / Fedora 29 / Fedora 28

How to Install Django on Fedora 29 / Fedora 28

How to install LAMP Stack on Fedora 29 / Fedora 28

Install and Configure phpMyAdmin on Fedora

How to install PostgreSQL 11 on Fedora 29 / Fedora 28

How to install MySQL 8.0 on Fedora 29 / Fedora 28