只需要如下操作即可:
#yum clean all && yum makecache && yum update -y
但是这样的docker文件系统是有问题的,
[root@jboss ~]# docker info
Containers: 0
Images: 0
Storage Driver: devicemapper
Pool Name: docker-253:0-5112199-pool
Pool Blocksize: 65.54 kB
Backing Filesystem: extfs
Data file: /dev/loop0
Metadata file: /dev/loop1
Data Space Used: 305.7 MB
Data Space Total: 107.4 GB
Metadata Space Used: 733.2 kB
Metadata Space Total: 2.147 GB
Udev Sync Supported: true
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Library Version: 1.02.89-RHEL6 (2014-09-01)
Execution Driver: native-0.2
Kernel Version: 2.6.32-358.el6.x86_64
Operating System: <unknown>
CPUs: 16
Total Memory: 70.75 GiB
Name: jboss
注意 Data file: /dev/loop0,docker的文件存储是用loop循环块设备模式进行挂载读写,今后扩容很是麻烦。
所以最后还是升级内核3.10后进行操作
升级内核,只需要4步:
#cd /etc/yum.repos.d
#wget http://www.hop5.in/yum/el6/hop5.repo
#yum install kernel-ml-aufs kernel-ml-aufs-devel -y
#修改grub.conf启动内核3.10 && reboot
再继续玩!
Containers: 0
Images: 0
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 0
Execution Driver: native-0.2
Kernel Version: 3.10.5-3.el6.x86_64
Operating System: <unknown>
CPUs: 24
Total Memory: 11.81 GiB
Storage Driver: aufs 看见了吗?
/etc/yum.repos.d/docker.repo
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg