Docker.io 是轻量级的“容器引擎+映像仓库”,在LXC(linux轻量级容器)的基础上构建,可以运行任何应用程序。
docker.io的核心层由以下几个部分组成:
1、可执行程序,“/usr/bin/docker”
2、docker.io网站上有一系列创建好的操作系统和应用程序映像
3、AUFS(另一个统一文件系统)来实现文件系统的快照,文件变化,控制只读或读写的需求。
4、LXC(Linux轻量级容器)
5、Cgroups(各种资源和命名空间的管理)
在本文写作的时候,最新版本是0.5.3,但目前开发很活跃,一些功能和特性可能在新版本中会发生变化。
按下面的步骤安装docker.io:
0、安装centos6.x
1、因为selinux和LXC有冲突,所以需要禁用
[root@localhost ~]# cat /etc/selinux/config # This file controls the state of SELinux on the system.# SELINUX= can take one of these three values:# enforcing - SELinux security policy is enforced.# permissive - SELinux prints warnings instead of enforcing.# disabled - SELinux is fully disabled.SELINUX=disabled# SELINUXTYPE= type of policy in use. Possible values are:# targeted - Only targeted network daemons are protected.# strict - Full SELinux protection.SELINUXTYPE=targeted
2、配置Fedora EPEL 源
sudo yum install http://ftp.riken.jp/Linux/fedora/epel/6/i386/epel-release-6-8.noarch.rpm
3、配置hop5.in源
cd /etc/yum.repos.dsudo wget http://www.hop5.in/yum/el6/hop5.repo
4、安装docker-io
[root@localhost ~]# yum install docker-ioLoaded plugins: fastestmirror, securityLoading mirror speeds from cached hostfile * base: centos.excellmedia.net * epel: kartolo.sby.datautama.net.id * extras: centos.excellmedia.net * updates: centos.excellmedia.netSetting up Install ProcessResolving Dependencies--> Running transaction check---> Package docker-io.x86