美文网首页
kubernetes集群搭建二:docker安装

kubernetes集群搭建二:docker安装

作者: 开始懂了90 | 来源:发表于2018-12-18 16:52 被阅读0次

导入 yum 源

# 安装 yum-config-manager

yum -y install yum-utils policycoreutils-python

# 导入
yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo


# 更新 repo
yum makecache

# 查看yum 版本

yum list docker-ce.x86_64  --showduplicates |sort -r

安装指定版本 docker-ce 17.03 被 docker-ce-selinux 依赖, 不能直接yum 安装 docker-ce-selinux

wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm


rpm -ivh docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm


yum -y install docker-ce-17.03.2.ce

启动docker

systemctl enable docker
systemctl start docker

查看安装

docker version
Client:
 Version:      17.03.2-ce
 API version:  1.27
 Go version:   go1.7.5
 Git commit:   f5ec1e2
 Built:        Tue Jun 27 02:21:36 2017
 OS/Arch:      linux/amd64

修改存储模式为devicemapper (默认 overlay)

 systemctl stop docker
 
vi /etc/docker/daemon.json. 

{
  "storage-driver": "devicemapper"
}

$ sudo systemctl start docker

相关文章

网友评论

      本文标题:kubernetes集群搭建二:docker安装

      本文链接:https://www.haomeiwen.com/subject/iqtyhqtx.html