一、部署環境
- 操作系統:CentOS Linux release 7.8.2003 (Core)
- 防火墻:關閉
- SELinux:關閉
二、部署過程
rm -rf /etc/yum.repos.d/*.repo
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum install yum-utils device-mapper-persistent-data lvm2 -y
yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum clean all
yum makecache fast
yum list docker-ce --showduplicates
yum install docker-ce-18.09.9-3.el7 docker-ce-cli-18.09.9-3.el7 -y
systemctl enable docker
systemctl start docker
systemctl status docker
docker version
mkdir -p /etc/docker
tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://yln6o2wd.mirror.aliyuncs.com"]
}
EOF
systemctl daemon-reload
systemctl restart docker
docker pull hello-world
docker images
docker run hello-world
docker ps -a
最后編輯于 :
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。