centos7.3 docker升级

前端之家收集整理的这篇文章主要介绍了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 业务不受影响。

原文链接:https://www.f2er.com/centos/375706.html

猜你在找的CentOS相关文章