centos安裝docker

1.卸載過去的版本
yum remove docker docker-common docker-selinux docker-engine
2.安裝docker所需插件:
yum install -y yum-utils device-mapper-persistent-data lvm2
3.
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

centos安裝docker

若是報上面的錯就執行:yum install epel-release -y
4.安裝最新版本的Docker CE
   yum install docker-ce -y
使用阿里雲docker倉庫
vim /etc/docker/daemon.json
{
   "registry-mirrors": ["https://pee6w651.mirror.aliyuncs.com"]
}
注意須要同步服務器時間: ntpdate -u ntp.aliyun.com
相關文章
相關標籤/搜索