CentOS下Docker安裝

一、禁用selinux
由於selinux和LXC有衝突,所以需要禁用selinux。編輯/etc/selinux/config,設置兩個關鍵變量。    
SELINUX=disabled 
SELINUXTYPE=targeted

二、配置Fedora EPEL源
sudo yum install http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm

三、添加hop5.repo源

cd /etc/yum.repos.d 
sudo wget http://www.hop5.in/yum/el6/hop5.repo

四、安裝Docker
sudo yum install docker-io

五、注意事項:

問題1:

2014/09/21 07:41:07 Error response from daemon: Cannot start container 69ea1127e5e93ae33e0ce93f8403926d08212f5801cc3e3bfbc52d6c6c991c8a: unable to remount sys readonly: unable to mount sys as readonly max retries reached

解決方法:

1、修改Docker的配置參數:把/etc/sysconfig/docker文件中的other-args更改爲     
    other_args="--exec-driver=lxc --selinux-enabled"
2、重啓docker服務:sudo service docker restart







發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章