docker docker-compose 安装
docker 脚本安装
- 下载安装脚本
curl -fsSL https://get.docker.com -o get-docker.sh
- 运行安装脚本
sudo sh get-docker.sh
- 确认 docker 是否允许
systemctl status docker
- 设置 docker 开机自启
systemctl enable docker
docker-compose 脚本安装
- 下载 docker-compose
curl -SL https://github.com/docker/compose/releases/download/v2.29.2/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
- 添加 docker-compose 命令
chmod +x /usr/local/bin/docker-compose
- 显示 docker-compose 版本
docker-compose -v