25.1 C
Texas
angeloma
Senior Writer and partner

How to install Docker on Fedora 34/33?

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.

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:

- Advertisement -

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
1.- Installing Docker on Fedora 34/33
1.- Installing Docker on Fedora 34/33

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: system.unified_cgroup_hierarchy=0.

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.

Conclusion

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.

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

5 COMMENTS

  1. I think it should be systemd.unified_cgroup_hierarchy (it says system, without the d).

    Anyway this didn’t work for me.

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article