yum安装docker-ce和docker-compose
yum安装docker-ce和docker-compose
docker-ce安装命令
# 安装yum-utils
yum install -y yum-utils
# 配置yum源
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
# 安装docker-ce
yum install -y docker-ce
# 设置开机启动服务
# 启动服务
systemctl start docker
systemctl enable docker
docker-compose安装命令
# 安装epel源
yum install -y epel-release
# 安装docker-compose,如果没有python3会安装python3
yum install -y docker-compose