在AlmaLinux上安装Docker和docker-compose
安装Docker
# dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
# dnf -y install docker-ce docker-ce-cli containerd.io
Docker启动和启动设置
# systemctl start docker
# systemctl enable docker
确认
只要能够确认版本就可以了!
# docker --version
Docker version 20.10.17, build 100c701
安装Docker Compose
# curl -L "https://github.com/docker/compose/releases/download/v2.4.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
授予执行权限
# chmod +x /usr/local/bin/docker-compose
确认
只要能确认版本就可以了!
# docker-compose --version
Docker Compose version v2.4.1