centos7.3 docker升级

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centos7.3 docker升级相关的知识,希望对你有一定的参考价值。

#升级操作系统,centos7直接升级到7.3

yum clean all

yum update


#升级内核

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm

yum --enablerepo=elrepo-kernel install  kernel-ml-devel kernel-ml -y

grub2-set-default 0

reboot


#安装docker


wget https://download.docker.com/linux/centos/docker-ce.repo -P /etc/yum.repos.d/

yum install -y  docker-ce


mkdir -p /data0/docker/var  && ln -s /data0/docker/var /var/lib/docker


mkdir /etc/docker/

echo "

{

  "storage-driver": "overlay2",

  "storage-opts": [ "overlay2.override_kernel_check=true" ],

  "registry-mirrors": ["https://pej3ico7.mirror.aliyuncs.com"],

  "insecure-registries":["10.211.121.26:5000","10.211.121.9:5000"],

  "live-restore" : false

}


" >> /etc/docker/daemon.json


systemctl  start docker



关闭selinxu  iptables    networkmanager

需要注意/etc/resolve,关闭networkmanager后无法正常使用域名访问。





报错:

level=error msg="[graphdriver] prior storage driver devicemapper failed: devmapper: Base Device UUID and Filesystem verification failed: devicemapper: Can‘t set cookie dm_task_set_cookie failed"

Aug 17 08:35:42 cephnode2 dockerd: Error starting daemon: error initializing graphdriver: devmapper: Base Device UUID and Filesystem verification failed: devicemapper: Can‘t set cookie dm_task_set_cookie failed


解决:

echo ‘y‘ | sudo dmsetup udevcomplete_all



docker 重启后:

kernel:unregister_netdevice: waiting for lo to become free. Usage count = 1




rancher 灾备测试:


26server 删除重启   外挂数据库 ,重新启动server进程, 创建的swarm 业务不受影响。




本文出自 “Devops” 博客,请务必保留此出处http://devops9527.blog.51cto.com/2419132/1969728

以上是关于centos7.3 docker升级的主要内容,如果未能解决你的问题,请参考以下文章

Centos7.3 Docker安装部署学习记录1

CentOS7 升级到7.4

CentOS7.3服务器内网离线部署docker和容器

00-Docker基础环境搭建-CentOS7.3

centos7.3安装docker

centos7.3离线安装telnet用于升级openssh