If there is a system that is characterized by the incorporation of new features is Fedora Linux. This is because it wants to be a modern, safe and leading distribution in the collaboration of projects. This philosophy fits quite well with Docker because it is a powerful technology, innovative and above all useful for the administration of servers. So, in this context, this article will help you install Docker in Fedora 34/33.
Docker is a recent technology that allows the deployment of applications and programs in the form of containers. That is, as a kind of virtual machine but contained only for that application. In this blog, we have taught you how to install some applications using this methodology.
- Deploy PHPMyAdmin using Docker Compose
- Nextcloud using Docker compose
- How to deploy Jenkins using docker-compose?
- Deploy MongoDB using Docker Compose
This is a great advantage at the time of deployment because we do not care about the dependencies they may have. On the other hand, Docker is very secure and by default isolates network processes and data between host and container. It is widely used among sysadmin and even developers.
Install Docker on Fedora 34/33?
Fedora 34 being so new, uses cgroups v2 by default and this is a problem with Docker because it doesn’t implement it yet. Then, to the steps that are indicated in the official documentation of Docker, it is necessary to add some new steps. Let’s go for it:
First let’s install Docker normally, for it opens a terminal session and executes the following command:
$ sudo dnf config-manager --add--repo https://download.docker.com/linux/fedora/docker-ce.repo
Then, once the Docker repository is configured, we proceed to install it with the following command:
:~$ sudo dnf install docker-ce
When the installation is complete, Docker will be installed.
You can configure Docker to run without root permissions. To do this, run the following commands:
:~$ sudo groupadd docker :$ sudo groupadd docker
:~$ sudo usermod -aG docker $USER
We will now make some changes to Fedora’s grub to adapt the system to Docker.
Edit the default grub configuration file:
:~$ sudo gedit /etc/default/grub
And in the line that starts with “
GRUB_CMDLINE_LINUX“, the following parameter must be added:
Then save the changes and close the file.
To apply the changes you have to update the grub with the following command:
:~$ sudo grub2-mkconfig
And finally, reboot the system.
When you start the system again, you can start and use docker. To start the service, just use the following command:
:~$ sudo systemctl start docker
And if you want it to start along with the system, add this other command:
:~$ sudo systemctl enable docker
And now, you can use Docker on Fedora 34/33.
Fedora is an excellent and innovative system, but sometimes being at the forefront means some inconvenience when installing certain programs. That is why for Docker to work perfectly, you have to take some extra steps. And you have learned that today.