# 卸载老版本Docker
sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine
# 安装依赖
sudo yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
# 添加docker下载仓库
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
# 安装docker-ce
sudo yum install docker-ce
# 启动docker-ce
sudo systemctl start docker
# 验证
sudo docker --version
sudo docker run hello-world
yum install epel-release
yum install -y python-pip
pip install docker-compose