下載 .rpm
安裝包, 使用此地址選擇要下載的版本 https://download.docker.com/linux/centos/7/x86_64/stable/Packages/linux
curl -O https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-18.06.1.ce-3.el7.x86_64.rpm
安裝dockerdocker
sudo yum install docker-ce-18.06.1.ce-3.el7.x86_64.rpm
啓動dockercentos
sudo systemctl start docker
驗證安裝書否成功curl
sudo docker run hello-world
下載新的安裝包url
curl -O https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-18.06.1.ce-3.el7.x86_64.rpm
使用yum -y upgrade
更新dockercode
sudo yum -y upgrade docker-ce-18.06.1.ce-3.el7.x86_64.rpm