引言
承接上一章【K8s 集群搭建系列(一) Centos 7 準(zhǔn)備】蝙云,我們進(jìn)行下一步,安裝 Docker波材。好了朵你,讓我們開始吧抡医!
Docker 安裝
- 必要工具安裝
[root@localhost ~]# yum install -y yum-utils
- 添加 Docker 源
[root@localhost ~]# yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
- 安裝 Docker
[root@localhost ~]# yum makecache fast
[root@localhost ~]# yum install -y docker-ce-19.03.12
- 開機(jī)自啟
[root@localhost ~]# systemctl enable docker
[root@localhost ~]# systemctl start docker
- 配置鏡像源
[root@localhost ~]# vim /etc/docker/daemon.json
# 添加以下內(nèi)容
{
"registry-mirrors": [
"https://registry.docker-cn.com"
]
}
# 重啟 Docker
[root@localhost ~]# systemctl daemon-reload
[root@localhost ~]# systemctl restart docker
尾聲
Docker 已經(jīng)安裝完畢了,我們可以迅速進(jìn)入下一章【K8s 搭建】大脉。