VPS: linode
OS: CentOS 6.6
CentOS 系列安装 Docker
$ sudo yum install http://mirrors.yun-idc.com/epel/6/i386/epel-release-6-8.noarch.rpm
$ sudo yum install docker-io
( 如果報錯:
...
error: Couldn't fork %pre(libcgroup-0.40.rc1-15.el6_6.x86_64): Cannot allocate memory
代表記憶體不夠,我先把apache關掉再裝)
然後照 docker 使用心得 登錄docker hub帳號並pull下你的repository
執行時報錯 - failed to find the cgroup root
# docker run -t -i kalecgos0616/bear-test:latest bash
FATA[0000] Error response from daemon: Cannot start container 9292dac26b4d594b1e8ebea10e16f4f17a5b6bf52d3da45d233ce96c8237e275: failed to find the cgroup root
解法:
1. 停用docker
2. 編輯 /etc/cgconfig.conf ,把 memory = /cgroup/memory; 這行註解掉
3. 重啟cgconfig
# /etc/init.d/cgconfig restart
4. 啟用docker並執行
參考資料:
http://yeasy.gitbooks.io/docker_practice/content/install/centos.html # CentOS 系列安装 Docker
https://forum.linode.com/viewtopic.php?t=10993&p=64060 # linode執行docker錯誤時的解法
沒有留言:
張貼留言