CentOS7安装docker和docker-compose
1.安装docker
# 使用yum安装dockeryum -y install docker# 启动systemctl start docker.service# 设置为开机自启动systemctl enable docker.service
2.安装docker-compose
# 下载docker-composesudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose# 添加可执行权限(这里不懂可以看一下菜鸟教程-linux教程-文件权限)sudo chmod +x /usr/local/bin/docker-compose# 查看docker-compose版本docker-compose --version
最后,如有问题,请留言。
赞 (0)