Welcome to our guide on how to install Docker CE on Fedora 34/33/32/31/30 Linux distribution. 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 install Docker CE on Fedora 34/33/32/31/30 Linux system.

Step 1: Update your system

Before we install Docker on Fedora 34/33/32/31/30 Linux machine, we’ll 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 CE repository to Fedora 34/33/32/31/30

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

sudo dnf -y install dnf-plugins-core

Fedora 34:

sudo tee /etc/yum.repos.d/docker-ce.repo<<EOF
[docker-ce-stable]
name=Docker CE Stable - \$basearch
baseurl=https://download.docker.com/linux/fedora/34/\$basearch/stable
enabled=1
gpgcheck=1
gpgkey=https://download.docker.com/linux/fedora/gpg
EOF

Fedora 33:

sudo tee /etc/yum.repos.d/docker-ce.repo<<EOF
[docker-ce-stable]
name=Docker CE Stable - \$basearch
baseurl=https://download.docker.com/linux/fedora/33/\$basearch/stable
enabled=1
gpgcheck=1
gpgkey=https://download.docker.com/linux/fedora/gpg
EOF

Fedora 32:

sudo tee /etc/yum.repos.d/docker-ce.repo<<EOF
[docker-ce-stable]
name=Docker CE Stable - \$basearch
baseurl=https://download.docker.com/linux/fedora/32/\$basearch/stable
enabled=1
gpgcheck=1
gpgkey=https://download.docker.com/linux/fedora/gpg
EOF

Fedora 31:

sudo tee /etc/yum.repos.d/docker-ce.repo<<EOF
[docker-ce-stable]
name=Docker CE Stable - \$basearch
baseurl=https://download.docker.com/linux/fedora/32/\$basearch/stable
enabled=1
gpgcheck=1
gpgkey=https://download.docker.com/linux/fedora/gpg
EOF

Fedora 30:

sudo tee /etc/yum.repos.d/docker-ce.repo<<EOF
[docker-ce-stable]
name=Docker CE Stable - \$basearch
baseurl=https://download.docker.com/linux/fedora/30/\$basearch/stable
enabled=1
gpgcheck=1
gpgkey=https://download.docker.com/linux/fedora/gpg
EOF

Step 3: Install Docker CE on Fedora 34/33/32/31/30

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

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

Press the y key when prompted to start the installation.

Dependencies resolved.
==================================================================================================================================================================
 Package                                         Architecture                 Version                                Repository                              Size
==================================================================================================================================================================
Installing:
 containerd.io                                   x86_64                       1.4.4-3.1.fc33                         docker-ce-stable                        32 M
 docker-ce                                       x86_64                       3:20.10.5-3.fc33                       docker-ce-stable                        25 M
 docker-ce-cli                                   x86_64                       1:20.10.5-3.fc33                       docker-ce-stable                        33 M
Installing dependencies:
 container-selinux                               noarch                       2:2.145.0-1.fc33                       fedora                                  38 k
 docker-ce-rootless-extras                       x86_64                       20.10.5-3.fc33                         docker-ce-stable                       5.4 M
 fuse-common                                     x86_64                       3.9.4-1.fc33                           fedora                                 8.6 k
 fuse-overlayfs                                  x86_64                       1.4.0-1.fc33                           updates                                 73 k
 fuse3                                           x86_64                       3.9.4-1.fc33                           fedora                                  56 k
 fuse3-libs                                      x86_64                       3.9.4-1.fc33                           fedora                                  95 k
 iptables                                        x86_64                       1.8.5-3.fc33                           fedora                                 108 k
 libcgroup                                       x86_64                       0.42.2-3.fc33                          fedora                                  66 k
 libslirp                                        x86_64                       4.3.1-3.fc33                           updates                                 68 k
 slirp4netns                                     x86_64                       1.1.9-1.fc33                           updates                                 57 k

Transaction Summary
==================================================================================================================================================================
Install  13 Packages

Total download size: 96 M
Installed size: 421 M
Is this ok [y/N]: y

And accept to import GPG key:

------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                              84 MB/s |  96 MB     00:01
warning: /var/cache/dnf/docker-ce-stable-ce8c657c263a7868/packages/containerd.io-1.4.4-3.1.fc33.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
Docker CE Stable - x86_64                                                                                                          87 kB/s | 1.6 kB     00:00
Importing GPG key 0x621E9F35:
 Userid     : "Docker Release (CE rpm) <[email protected]>"
 Fingerprint: 060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35
 From       : https://download.docker.com/linux/fedora/gpg
Is this ok [y/N]: y

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

sudo systemctl enable --now docker

You can check status with:

$ 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 Sat 2020-04-11 07:40:43 EAT; 18s ago
Docs: https://docs.docker.com
Main PID: 110574 (dockerd)
Tasks: 16
Memory: 94.4M
CPU: 414ms
CGroup: /system.slice/docker.service
└─110574 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
Apr 11 07:40:42 myfed.localhost dockerd[110574]: time="2020-04-11T07:40:42.495248159+03:00" level=warning msg="Your kernel does not support cgroup rt period"
Apr 11 07:40:42 myfed.localhost dockerd[110574]: time="2020-04-11T07:40:42.495258892+03:00" level=warning msg="Your kernel does not support cgroup rt runtime"
Apr 11 07:40:42 myfed.localhost dockerd[110574]: time="2020-04-11T07:40:42.495303222+03:00" level=warning msg="Unable to find blkio cgroup in mounts"
Apr 11 07:40:42 myfed.localhost dockerd[110574]: time="2020-04-11T07:40:42.496229752+03:00" level=info msg="Loading containers: start."
Apr 11 07:40:43 myfed.localhost dockerd[110574]: time="2020-04-11T07:40:43.186309804+03:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.>
Apr 11 07:40:43 myfed.localhost dockerd[110574]: time="2020-04-11T07:40:43.442573424+03:00" level=info msg="Loading containers: done."
Apr 11 07:40:43 myfed.localhost dockerd[110574]: time="2020-04-11T07:40:43.508370327+03:00" level=info msg="Docker daemon" commit=afacb8b7f0 graphdriver(s)=overlay2 ver>
Apr 11 07:40:43 myfed.localhost dockerd[110574]: time="2020-04-11T07:40:43.508940967+03:00" level=info msg="Daemon has completed initialization"
Apr 11 07:40:43 myfed.localhost dockerd[110574]: time="2020-04-11T07:40:43.547750478+03:00" level=info msg="API listen on /run/docker.sock"
Apr 11 07:40:43 myfed.localhost systemd[1]: Started Docker Application Container Engine.

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)
newgrp docker

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

$ docker version
Client: Docker Engine - Community
 Version:           20.10.5
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        55c4c88
 Built:             Tue Mar  2 20:19:16 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.5
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       363e9a8
  Built:            Tue Mar  2 20:16:56 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.4
  GitCommit:        05f951a3781f4f2c1911b05e61c160e9c30eaa8e
 runc:
  Version:          1.0.0-rc93
  GitCommit:        12644e614e25b05da6fd08a38ffa0cfe1903fdec
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

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

How to Install Django on Fedora

How to install LAMP Stack on Fedora

Install and Configure phpMyAdmin on Fedora

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!


As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.

LEAVE A REPLY

Please enter your comment!
Please enter your name here