Fedora

Install Docker Engine on Fedora

In this tutorial, we are going to learn how to install the Docker Engine and all the associated components on Fedora-based systems.

Requirements:

To install the Docker Engine, you need to have a maintained version of Fedora. We recommend either of the following Fedora versions:

  • Fedora 37
  • Fedora 38
  • You will also require a network access
  • Ensure that you have sufficient permissions to install the packages on the system

Removing the Old Versions

Although this step is not required, it is good to ensure that you do not have the old packages such as Docker and Docker Engine.

You can run the following command to remove the old versions of the packages:

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

Once you have the old packages removed from the system, you can proceed and install the newer versions of Docker.

Install Docker on Fedora Using RPM

The first and most common method of installing Docker on Fedora is using the RPM repositories.

Install the “dnf-plugins-core” package and set up the repository.

$ sudo dnf -y install dnf-plugins-core
$ sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo

Once installed, update the system repositories to reflect the new changes.

Finally, you can install Docker by running the following commands:

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

This should automatically download and install the Docker Engine on your system.

Install Docker on Fedora Using the Installer Package

If you do not wish to use the RPM repositories, you can manually download the installer package and install it on your machine.

Open your browser and navigate to the following link:

https://download.docker.com/linux/fedora/38/x86_64/stable/Packages/

Select the packages that you wish to download and save them to a directory on your machine.

You can then use DNF to install the downloaded packages as follows:

$ sudo dnf -y install /path/to/package.rpm

Start Docker on Fedora

Once installed, you can start the Docker daemon by running the “systemctl” command as follows:

$ sudo systemctl start docker

This should start the Docker daemon and allow you to run the Docker containers on your host machine.

Conclusion

This short tutorial showed you how to quickly install and get the Docker Engine running on your Fedora system using Fedora 38.

About the author

John Otieno

My name is John and am a fellow geek like you. I am passionate about all things computers from Hardware, Operating systems to Programming. My dream is to share my knowledge with the world and help out fellow geeks. Follow my content by subscribing to LinuxHint mailing list