kubernetes

K8s 集群搭建系列(二) Docker 安装

2020-12-21  本文已影响0人  Tubetrue01

引言

承接上一章【K8s 集群搭建系列(一) Centos 7 准备】,我们进行下一步,安装 Docker。好了,让我们开始吧!

Docker 安装

[root@localhost ~]# yum install -y yum-utils
[root@localhost ~]# yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
[root@localhost ~]# yum makecache fast
[root@localhost ~]# yum install -y docker-ce-19.03.12
[root@localhost ~]# systemctl enable docker 
[root@localhost ~]# systemctl start docker
[root@localhost ~]# vim /etc/docker/daemon.json

# 添加以下内容
{
  "registry-mirrors": [
    "https://registry.docker-cn.com"
  ]
}

# 重启 Docker
[root@localhost ~]# systemctl daemon-reload
[root@localhost ~]# systemctl restart docker

尾声

Docker 已经安装完毕了,我们可以迅速进入下一章【K8s 搭建】

上一篇 下一篇

猜你喜欢

热点阅读