参考官方教程
- Uninstall old versions
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
- Set up the repository
sudo yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
- Install docker ce
sudo yum install -y docker-ce
- Install a specific version of docker ce
yum list docker-ce --showduplicates | sort -r
sudo yum install docker-ce-<VERSION STRING>
- Start docker
sudo systemctl start docker
网友评论