How to install and use Docker on Fedora Linux 35

Docker is a set of platform as a service (PaaS) products that use OS-level virtualization to deliver software in packages called containers. The service has both free and premium tiers. The software that hosts the containers is called Docker Engine.

I will show you how to install Docker-CE (Community edition) to Fedora Linux 35.

We first have to add a docker repo to dnf and install all the required packages. Finally we start and enable docker service.

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

sudo systemctl enable --now docker

Next, we install Portainer which is a web-gui based container managment tool.

We simply deploy it as a container

docker volume create portainer_data

docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:2.11.1