#?把yum包更新到最新
yum update
#設(shè)置yum源
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo(阿里倉庫)
#查看所有倉庫中所有docker版本,并選擇特定版本安裝
yum list docker-ce --showduplicates | sort -r
安裝Docker,命令:yum install docker-ce-版本號(hào),我選的是docker-ce-18.03.1.ce
#啟動(dòng)
systemctl start docker
#開機(jī)自啟
systemctl enable docker