Docker如今有CE和EE版本 , CE版本是免費版本 , 該文檔安裝的就是CE版本linux
1.刪除舊版本dockerdocker
保險起見 , 走流程centos
yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-engine
2.安裝必要軟件緩存
yum install -y yum-utils \ device-mapper-persistent-data \ lvm2
3.添加docker的yum源app
yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo
4.檢查yum源是否可用async
yum-config-manager --enable docker-ce-nightly
async = True 便可
5.重建yum緩存測試
yum makecache
6.安裝docker-cespa
yum install docker-ce docker-ce-cli containerd.io
7.啓動/中止dockerrest
#啓動docker systemctl start docker #關閉docker systemctl stop docker #重啓docker systemctl restart docker #查看docker版本 docker -v #測試docker docker run hello-world