You can quickly install Docker environment on AlmaLinux 8 and 9. Just create a simple bash script with the following content:
vi /root/docker-install.sh
#!/bin/bash
dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
dnf install docker-ce docker-ce-cli containerd.io -y
systemctl enable --now docker
curl -SL https://github.com/docker/compose/releases/download/v2.16.0/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
docker-compose --version
Make the script executable:
chmod u+x /root/docker-install.sh
Run the script:
/root/docker-install.sh