Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fedora - Docker and Fedora 32

#1
Docker and Fedora 32

<div><p>With the release of Fedora 32, regular users of <a href="https://docs.docker.com/">Docker</a> have been confronted by a small challenge. At the time of writing, Docker is not supported on Fedora 32. There are alternatives, like <a href="https://podman.io/getting-started/">Podman</a> and <a href="https://buildah.io/">Buildah</a>, but for many existing users, switching now might not be the best time. As such, this article can help you set up your Docker environment on Fedora 32.</p>
<p> <span id="more-31212"></span> </p>
<h2>Step 0: Removing conflicts</h2>
<p>This step is for any user upgrading from Fedora 30 or 31. If this is a fresh installation of Fedora 32, you can move on to step 1.</p>
<p>To remove docker and all its related components:</p>
<pre class="wp-block-preformatted">sudo dnf remove docker-*
sudo dnf config-manager --disable docker-*</pre>
<h2>Step 1: System preparation</h2>
<p>With the last two versions of Fedora, the operating system has moved to two new technologies: CGroups and NFTables for the Firewall. While the details of these new technologies is behind the scope of this tutorial, it’s a sad fact that docker doesn’t support them yet. As such, you’ll have to make some changes to facilitate Docker on Fedora.</p>
<h3>Enable old CGroups</h3>
<p>The previous implementation of CGroups is still supported and it can be enabled using the following command.</p>
<pre class="wp-block-preformatted">sudo grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=0"</pre>
<h3>Whitelist docker in firewall</h3>
<p>To allow Docker to have network access, two commands are needed.</p>
<pre class="wp-block-preformatted">sudo firewall-cmd --permanent --zone=trusted --add-interface=docker0
sudo firewall-cmd --permanent --zone=FedoraWorkstation --add-masquerade</pre>
<p>The first command will add the Docker-interface to the trusted environment which allows Docker to make remote connections. The second command will allow docker to make local connections. This is particularly useful when multiple Docker containers are in as a development environment.</p>
<h2>Step 2: installing Moby</h2>
<p><a href="https://mobyproject.org/">Moby</a> is the open-source, white label version of Docker. It’s based on the same code but it does not carry the trademark. It’s included in the main Fedora repository, which makes it easy to install.</p>
<pre class="wp-block-preformatted">sudo dnf install moby-engine docker-compose</pre>
<p>This installs <em>moby-engine</em>, <em>docker-compose</em>, <em>containerd</em> and some other related libraries. Once installed, you’ll have to enable the system-wide daemon to run docker.</p>
<pre class="wp-block-preformatted">sudo systemctl enable docker
</pre>
<h2>Step 3: Restart and test</h2>
<p>To ensure that all systems and settings are properly processed, you’ll now have to reboot your machine.</p>
<pre class="wp-block-preformatted">sudo systemctl reboot</pre>
<p>After that, you can validate your installation using the Docker hello-world package.</p>
<pre class="wp-block-preformatted">sudo docker run hello-world</pre>
<p>You are then greeted by the Hello from Docker! unless something went wrong. </p>
<h3>Running as admin</h3>
<p>Optionally, you can now also add your user to the group account of Docker, so that you can start docker images without typing <em>sudo</em>.</p>
<pre class="wp-block-preformatted">sudo groupadd docker
sudo usermod -aG docker $USER</pre>
<p>Logout and login for the change to take effect. If the thought of running containers with administrator privileges concerns you, then you should look into Podman.</p>
<h2>In summary</h2>
<p>From this point on, Docker will work how you’re used to, including docker-compose and all docker-related tools. Don’t forget to check out the official documentation which can help you in many cases where something isn’t quite right.</p>
<p>The current state of Docker on Fedora 32 is not ideal. The lack of an official package might bother some, and there is an <a href="https://github.com/docker/for-linux/issues/955">issue upstream</a> where this is discussed. The missing support for both <a href="https://github.com/moby/moby/issues/40360">CGroups</a> and <a href="https://github.com/moby/moby/issues/26824">NFTables</a> is more technical, but you can check their progress in their public issues.</p>
<p>These instruction should allow you to continue working like nothing has happened. If this has not satisfied your needs, don’t forget to address your technical issues at the Moby or Docker Github pages, or take a look at Podman which might prove more robust in the long-term future.</p>
</div>


https://www.sickgaming.net/blog/2020/06/...fedora-32/
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB Theme © iAndrew 2016