Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to run Docker on Fedora 32

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces you how to run Docker on Fedora 32, the content is very detailed, interested friends can refer to, hope to be helpful to you.

With the release of Fedora 32, the average user of Docker faces a small challenge. At the time of this writing, Fedora 32 does not support Docker. Although there are other options, such as Podman and Buildah, for many existing users, now may not be the best time to switch. Therefore, this article can help you set up the Docker environment on Fedora 32.

Step 0: eliminate conflicts

This step applies to any user who upgrades from Fedora 30 or 31. If you have a newly installed Fedora 32, you can skip to step 1.

Remove docker and all its related components:

Sudo dnf remove docker-*sudo dnf config-manager-- disable docker-* step 1: system preparation

In the last two versions of Fedora, the operating system has migrated to two new technologies: CGroups and NFTables for firewalls. Although the details of these new technologies are beyond the scope of this tutorial, unfortunately, Docker does not support these new technologies yet. Therefore, you have to make some changes to use Docker on Fedora.

Enable the old CGroups

Fedora still supports the previous implementation of CGroups, which can be enabled using the following command:

Sudo grubby-update-kernel=ALL-args= "systemd.unified_cgroup_hierarchy=0" whitelist Docker in the firewall

In order for Docker to have network access, two commands are required:

Sudo firewall-cmd-permanent-zone=trusted-add-interface=docker0sudo firewall-cmd-permanent-zone=FedoraWorkstation-add-masquerade

The first command adds the Docker interface to the trusted environment, which allows Docker to establish a remote connection. The second command will allow Docker to establish a local connection. This is especially useful when you have multiple Docker containers as your development environment.

Step 2: install Moby

Moby is the open source white-card version of Docker. It is based on the same code, but without a trademark. It is included in the main repository of Fedora, so it is easy to install:

Sudo dnf install moby-engine docker-compose

This will install moby-engine, docker-compose, containerd, and other related libraries. After the installation is complete, you must enable the system-level daemon to run Docker:

Sudo systemctl enable docker step 3: restart and test

To ensure that all systems and settings are handled correctly, you must restart your computer now:

Sudo systemctl reboot

After that, you can use the Docker hello-world package to verify the installation:

Sudo docker run hello-world

Unless you have a problem, you will see greetings from Docker!

Run as an administrator

Optionally, you can now also add users to the Docker group account so that you can start the Docker image without entering sudo:

Sudo groupadd dockersudo usermod-aG docker $USER

Log out and log in for the changes to take effect. If the idea of running the container with administrator privileges worries you, then you should study Podman.

Summary

From now on, Docker will work according to your habits, including docker-compose and all docker-related tools. Don't forget to check the official documentation, which can help you in many cases.

The current state of Docker on Fedora 32 is not ideal. The lack of official software packages may bother some people, and an upstream issue has been discussed. The lack of support for CGroups and NFTables is more of a technical problem, but you can see their progress on their public issues. These instructions should allow you to continue to work as if nothing had happened.

On how to run Docker on Fedora 32 to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report