How To Install Docker On AlmaLinux 8

Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications. By taking advantage of Docker’s methodologies for shipping, testing, and deploying code quickly, you can significantly reduce the delay between writing code and running it in production.

Prerequisites

This tutorial will require you to prepare a server with AlmaLinux OS installed. You can also follow the same tutorial for CentOS 8.

Step 1 : Install Package Management Tool

Yum-utils is included in the base repo so you can directly install it using yum command :

yum install -y yum-utils

Step 2 : Add Docker Repo to AlmaLinux

yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

Step 3 : Install Docker Engine

Install the latest version of Docker Engine and containerd.

dnf install docker-ce docker-ce-cli containerd.io -y

Step 4 : Enable Docker Auto Start On Reboot

systemctl enable docker

Step 5 : Start Docker Engine

service docker start

Step 6 : Install Docker Compose

Run this command to download the current stable release of Docker Compose:

sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

Apply executable permissions to the binary:

sudo chmod +x /usr/local/bin/docker-compose

Test Docker Compose via this command :

docker-compose --version

Syafi
Syafi

Hola ! I am Cloud System Engineer and I am very passionate about Linux, Cloud & Automation !

Articles: 4