一个完整的Docker有以下几个部分组成:
yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
yum install -y yum-utils
yum-config-manager \
--add-repo \
http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo ##此地址为官方的仓库地址,在国内建议不要用
yum makecache fase
yum install docker-ce docker-ce-cli containerd.io
systemctl start docker
docker version
docker run hello-world