安装Docker Engine
- 禁用selinux (因为它会干扰LXC的正常工作)
$ nano /etc/selinux/config
SELINUX=disabled
SELINUXTYPE=targeted
$ cd /etc/yum.repos.d
$ wget http://www.hop5.in/yum/el6/hop5.repo
$ yum install kernel-ml-aufs kernel-ml-aufs-devel
- 修改默认内核引导为0:
nano /etc/grub.conf
...
default=0
timeout=5
...
- 重启系统
shutdown -r now
- 检查内核版本
$ uname -r
$ 3.10.5-3.el6.x86_64
$ grep aufs /proc/filesystems
$ nodev aufs
$ wget http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ rpm -ivh epel-release-6-8.noarch.rpm
- 安装docker
yum -y install docker-io
- 安装依赖包device-mapper-libs 1.02.90
yum install device-mapper-libs
- 启动docker服务
service docker start
- 查看docker状态
service docker status
- 测试docker是否可以
docker run hello-world