docker安裝常見問題

一、linux

環境信息:
                       [root@joinApp2 ~]# uname -r
3.10.0-123.9.3.el7.x86_64
[root@joinApp2 ~]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)

症狀:

[root@joinApp2 ~]# systemctl  start  docker.service
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
[root@joinApp2 ~]# 
[root@joinApp2 ~]# 
[root@joinApp2 ~]# 
[root@joinApp2 ~]# systemctl status docker.service
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Thu 2016-02-25 17:26:11 CST; 16s ago
     Docs: 
                      http://docs.docker.com Process: 16384 ExecStart=/usr/bin/docker daemon $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY (code=exited, status=1/FAILURE)
 Main PID: 16384 (code=exited, status=1/FAILURE)

Feb 25 17:26:10 joinApp2 systemd[1]: Failed to start Docker Application Container Engine.
Feb 25 17:26:10 joinApp2 systemd[1]: Unit docker.service entered failed state.
Feb 25 17:26:10 joinApp2 systemd[1]: docker.service failed.
Feb 25 17:26:11 joinApp2 systemd[1]: docker.service holdoff time over, scheduling restart.
Feb 25 17:26:11 joinApp2 systemd[1]: start request repeated too quickly for docker.service
Feb 25 17:26:11 joinApp2 systemd[1]: Failed to start Docker Application Container Engine.
Feb 25 17:26:11 joinApp2 systemd[1]: Unit docker.service entered failed state.
Feb 25 17:26:11 joinApp2 systemd[1]: docker.service failed.

解決辦法:docker

(1)、shell

查看文件系統 /etc/docker/daemon.json 有沒有這個文件,沒有測建立它包括二級目錄 dockerjson

在daemon.json文件中輸入如下內容:app

 

{
                       
                      "storage-driver"
                      :
                       
                      "devicemapper"
                       
                      }
若是daemon.json
                      
                      文件包含格式不正確的JSON,
                      Docker將沒法啓動
                      。

(2)、執行了一下 curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://*******.m.daocloud.io 語句,而後 在這個文件中的/etc/docker/daemon.json 格式就變了{"registry-mirrors": ["http://****.m.daocloud.io"],} 最後一個多了一個逗號,我猜想是這個shell語句的緣由,我把逗號去掉之後,程序能夠正常啓動。curl

(3)、vi /etc/sysconfig/selinux    把selinux後面的改成disabled,重啓一波機器,再重啓docker就能夠了ui

 

 

 

Docker 沒法啓動的問題:

https://my.oschina.net/u/1188877/blog/422405

相關文章
相關標籤/搜索