Tech

How to install that latest version of Docker on AlmaLinux


Jack Wallen shows you how to replace Podman on AlmaLinux 9 with the Docker CE runtime tool.

program code computer programming programmer development developer developer
Image: REDPIXEL / Adobe Stock

AlmaLinux is a Linux clone of Red Hat Enterprise, which means it doesn’t come with Docker pre-installed. In fact, most RHEL-based distros currently default to Podman. While Podman is an application that closely resembles Docker, I still tend to love the original, so I’d rather use that technology than replace it.

The problem is that the Docker installation on the RHEL based distro is incorrect. It’s not difficult, but without knowing the proper steps or flags to use, you’ll find it virtually impossible to install Docker.

UNDERSTAND: Recruitment Toolkit: Back-end Developer (TechRepublic Premium)

Luckily, I took one for the team and figured out how it could be done without too much stress. Let’s make it happen.

What you will need to install Docker on AlmaLinux

The only things you need to make this work are a running instance of AlmaLinux 9 and a user with sudo privileges.

How to install Docker CE on AlmaLinux

Log in to your AlmaLinux instance and make sure it’s up to date with the command:

sudo dnf update

A word of warning – the update will take some time. Depending on how long it’s been since the last update (and the speed of your network connection), give this process 10 to 60 minutes. For me, it took about 30 minutes to complete.

Once the update is over, you’ll need to install the development tools, in a handy team way. This installation can be done with the command:

sudo dnf groupinstall "Development Tools"

Again, this installation will take some time. It’s faster than the update, but at least see the output from the command in five minutes or so.

Once that is done, you should probably restart the server if the update includes a kernel. When the reboot is finished, log back in and add the required Docker repository with the command:

sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo

With the repository added, we can now install Docker CE. However, this is where the trick comes into play. If you just use the command:

sudo dnf install docker-ce -y

The command will fail. Why? Because many Docker dependencies conflict with Podman and its dependencies. To solve that problem, you must install Docker CE and remove Podman and its related packages. This is done with the command:

sudo dnf install docker-ce --allowerasing

After the above command completes, start and enable the Docker service with:

sudo systemctl enable --now docker

Finally, add your user to the docker group with the command:

sudo usermod -aG docker $USER

Log out and log back in.

You can test the new installation by pulling down the hello-world image with the command:

docker pull hello-world

Congratulations, you just replaced Podman with Docker on AlmaLinux. Whether you should do this or not depends on whether you see Podman as a worthy successor to Docker. If not, this is your best bet other than switching to an Ubuntu-based server distro.

Subscribe to TechRepublic’s How to make technology work on YouTube for all the latest tech advice for business professionals from Jack Wallen.



Source link

news7g

News7g: Update the world's latest breaking news online of the day, breaking news, politics, society today, international mainstream news .Updated news 24/7: Entertainment, Sports...at the World everyday world. Hot news, images, video clips that are updated quickly and reliably

Related Articles

Back to top button