码迷,mamicode.com
首页 > 其他好文 > 详细

centos7.3 docker升级

时间:2017-09-29 19:51:02      阅读:140      评论:0      收藏:0      [点我收藏+]

标签: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升级

标签:docker

原文地址:http://devops9527.blog.51cto.com/2419132/1969728

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!