Today, in this article, we show how to to define up Docker on AlmaLinux. The Docker tool is used to run programs inside containers. The software package should work equally on any system, so it’s a great approach for developers and users to worry less about compatibility with an operating system and dependencies.
If you just upgraded from CentOS to AlmaLinux or installed AlmaLinux, you might be asking how to to define up Docker on the machine. Unfortunately, neither Red Hat Enterprise Linux nor AlmaLinux, which is a derivative of RHEL, provides native support for Docker. Red Hat promotes Podman as an alternative to Docker instead. Because of this, installing Docker on AlmaLinux is a little more challenging, but still doable.
we are going to demonstrate how to to define up Docker on AlmaLinux in this post so you can start installing containerized software. Similar to how you would use your distribution’s package management to get an app, you can use Docker to install software packages once installed. Using Docker makes a difference because everything is more automated and compatibility and dependencies are no longer potential issues. We have mentioned below the steps to install Docker on AlmaLinux.
Steps to install Docker on AlmaLinux
Step 1: Log into your instance of Soul Linux and make sure it’s up to date with the command:
sudo dnf update
Step 2: A word of warning – the update will take some time. Depending on how much time has passed since the last update (and the speed of your network connection), give this process anywhere from 10 to 60 minutes. For me it took about 30 minutes to complete.
Step 3: once the update ends, you’ll need to install the development tools, which come via a handy group. This one installation can be done with the command:
sudo dnf groupinstall “Development Tools”
Step 4: again this installation it will take some time. It’s faster than updatebut expect to at least watch the command output for about five minutes.
Step 5: When this is over, you should probably restart the server if the update included the core. When the reboot is done, log in again and add the Docker Repository with the command:
sudo dnf config-manager –add-repo=https://download.docker.com/linux/centos/docker-ce.repo
Step 6: With the repository added, we can now install Docker CE. However, this is where the trick comes into play. If you simply issue the command:
sudo dnf install docker-ce -y
Step 7: The command will fail. Because? Since many of Docker’s dependencies conflict with podman and its dependencies. To get around this you need to install Docker CE while removing podman and its associated packages at the same time. This is done with the command:
sudo dnf install docker-ce –allowerasing
Step 8: After completion of the above command, to start and to allow the Docker service with:
sudo systemctl enable –now docker
Step 9: Finally, add your user to the docker group with the command:
sudo usermod -aG docker $USER
Step 10: Go out and come back inside.
Step 11: You can test the new installation pulling the hello-world image with the command:
docker pull hello-world
Final Words
We hope you like our article about how to install Docker on AlmaLinux. As a clone of Red Hat Enterprise Linux, AlmaLinux does not come pre-installed with Docker. In fact, Podman is currently the default on most RHEL-based distributions. Although Podman is a close replacement for Docker, we still prefer to use the original technology because we have a soft spot for it. The problem is, it’s not exactly straightforward to install Docker on an RHEL-based distribution. It’s not difficult, but without understanding the proper procedures or flags to employ, installing Docker will be next to impossible.