您的位置:首页 > 运维架构 > Docker

在CentOS 6.4上安装Docker

2014-07-26 23:03 645 查看
根据Docker官方文档进行安装,记录了遇到的问题。

我认为自己已经安装了epel,于是直接运行了安装命令。

yum install docker-io


报错如下:

[root@docker conf]# yum search docker-io
Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
* base: centos.ustc.edu.cn
* epel: mirrors.yun-idc.com
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
base                | 3.7 kB     00:00
epel                | 3.7 kB     00:00
epel/primary_db     | 3.9 MB     00:01
extras              | 3.4 kB     00:00
google64            |  951 B     00:00
updates             | 3.4 kB     00:00
updates/primary_db  | 3.7 MB     00:00
epel/pkgtags        | 1.0 MB     00:00
Warning: No matches found for: docker-io
No Matches found


一定是epel的问题,于是重新安装,按照这个链接安装[传送门]

问题原因:没有启用remi源。

重新搜索docker-io包,成功了。

启动一个bash shell进行测试

docker run -i -t centos /bin/bash


报错如下:

2014/07/26 03:05:27 unable to remount sys readonly: unable to mount sys as readonly max retries reached


问题原因:配置文件不正确

//from statckvoerflow
your /etc/sysconfig/docker needs to look like this:
other_args="--exec-driver=lxc --selinux-enabled"
otherwise it will not work.


按照上面的说明修改配置文件,重启docker,成功。

serivce docker restart
docker run -i -t centos /bin/bash
bash-4.2#
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: