In this tutorial, we will show you how to install Docker on Fedora 35. For those of you who didn’t know, Docker is a container-based application framework, which wraps up a specific application with all its dependencies in a container. Containers are usually isolated from one another and bundled their own software libraries and configuration files, they can communicate with each other through well-defined channels.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘
sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the Docker Community Edition (CE) on a Fedora 35.
- A server running one of the following operating systems: Fedora 35.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
non-root sudo useror access to the
root user. We recommend acting as a
non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.
Install Docker on Fedora 35
Step 1. Before proceeding, update your Fedora operating system to make sure all existing packages are up to date. Use this command to update the server packages:
sudo dnf upgrade sudo dnf update sudo dnf install dnf-plugins-core
Step 2. Installing Docker on Fedora 35.
By default, Docker is available on Fedora 35 base repository. Now we run the following command below to add Docker repository to your Fedora system:
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/35/$basearch/stable enabled=1 gpgcheck=1 gpgkey=https://download.docker.com/linux/fedora/gpg EOF
Next, update packages and install the latest stable release of Docker CE using the following command:
sudo dnf makecache sudo dnf install docker-ce docker-ce-cli containerd.io
Once installation is complete we need to start the Docker server to start operating. We do that with the following command below:
sudo systemctl start docker sudo systemctl enable docker
Let’s check the version of the installed Docker:
Client: Docker Engine - Community Version: 20.10.14 API version: 1.41 Go version: go1.16.9 Git commit: dea9396 Built: Thu Dec 09 17:08:10 2021 OS/Arch: linux/amd64 Context: default Experimental: true
Step 3. Use Docker Images.
Now we search Docker container images from the Docker hub. For example, the below command will search all images with Ubuntu and list them as output:
sudo docker search ubuntu
Next, we can pull the Docker image with the following command. As an example let me pull the Ubuntu image from the Docker hub:
sudo docker pull fedora
Finally, launch a Docker container using the above-downloaded image on your system use the following command:
sudo docker run -i -t -d ubuntu /bin/bash
Congratulations! You have successfully installed Docker. Thanks for using this tutorial for installing the Docker container on your Fedora 35 system. For additional help or useful information, we recommend you check the official Docker website.