Install docker-ce error

Install docker-ce error

正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
docker-ce 已经是最新版 (5:18.09.2~3-0~ubuntu-bionic)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
有 1 个软件包没有被完全安装或卸载。
解压缩后会消耗 0 B 的额外空间。
您希望继续执行吗? [Y/n] y
正在设置 docker-ce (5:18.09.2~3-0~ubuntu-bionic) ...
update-alternatives: 警告: 链接组 dockerd 已损坏,故强制重新安装候选项 /usr/bin/dockerd-ce
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
invoke-rc.d: initscript docker, action "start" failed.
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Mon 2019-02-25 21:01:55 CST; 6ms ago
     Docs: https://docs.docker.com
  Process: 28441 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
 Main PID: 28441 (code=exited, status=1/FAILURE)

2月 25 21:01:55 Y systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
2月 25 21:01:55 Y systemd[1]: docker.service: Failed with result 'exit-code'.
2月 25 21:01:55 Y systemd[1]: Failed to start Docker Application Container Engine.
dpkg: 处理软件包 docker-ce (--configure)时出错:
 installed docker-ce package post-installation script subprocess returned error exit status 1
在处理时有错误发生:
 docker-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)

systemctl status docker.service

● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2019-02-25 20:56:52 CST; 1min 8s ago
     Docs: https://docs.docker.com
  Process: 27806 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
 Main PID: 27806 (code=exited, status=1/FAILURE)

2月 25 20:56:49 Y systemd[1]: Failed to start Docker Application Container Engine.
2月 25 20:56:52 Y systemd[1]: docker.service: Service hold-off time over, scheduling restart.
2月 25 20:56:52 Y systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
2月 25 20:56:52 Y systemd[1]: Stopped Docker Application Container Engine.
2月 25 20:56:52 Y systemd[1]: docker.service: Start request repeated too quickly.
2月 25 20:56:52 Y systemd[1]: docker.service: Failed with result 'exit-code'.
2月 25 20:56:52 Y systemd[1]: Failed to start Docker Application Container Engine.

journalctl -xe

-- Support: http://www.ubuntu.com/support
-- 
-- docker.service 单元已结束停止操作。
2月 25 21:02:02 Y systemd[1]: Closed Docker Socket for the API.
-- Subject: docker.socket 单元已结束停止操作
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- docker.socket 单元已结束停止操作。
2月 25 21:02:02 Y systemd[1]: Stopping Docker Socket for the API.
-- Subject: docker.socket 单元已开始停止操作
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- docker.socket 单元已开始停止操作。
2月 25 21:02:02 Y systemd[1]: Starting Docker Socket for the API.
-- Subject: docker.socket 单元已开始启动
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- docker.socket 单元已开始启动。
2月 25 21:02:02 Y systemd[1]: Listening on Docker Socket for the API.
-- Subject: docker.socket 单元已结束启动
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- docker.socket 单元已结束启动。
-- 
-- 启动结果为“RESULT”。
2月 25 21:02:02 Y systemd[1]: docker.service: Start request repeated too quickly.
2月 25 21:02:02 Y systemd[1]: docker.service: Failed with result 'exit-code'.
2月 25 21:02:02 Y systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: docker.service 单元已失败
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- docker.service 单元已失败。
-- 
-- 结果为“RESULT”。
2月 25 21:02:02 Y systemd[1]: docker.socket: Failed with result 'service-start-limit-hit'.
2月 25 21:02:05 Y systemd-timesyncd[693]: Timed out waiting for reply from 91.189.89.199:123 (ntp.ubuntu.com).

You can try and run the “dockerd” by hand, and see what errors occurs

1 Like

dockerd

unable to configure the Docker daemon with file /etc/docker/daemon.json: invalid character '"' after object key:value pair

vim /etc/docker/daemon.josn

    {               
      "registry-mirrors": [
        "https://registry.docker-cn.com"
      ]             
                    
      "runtimes": {
        "nvidia": { 
          "path": "/usr/bin/nvidia-container-runtime", 
            "runtimeArgs": [] 
          }         
      }             
                    
    }       

But I don’t hava this file.

What should I do?

I tried to modify this file and it run again! Tkank you very much ! ! !

    {                                                                                                                                                 
      "registry-mirrors": [
        "https://registry.docker-cn.com"
      ]
     
    }

glad it worked out :slight_smile:

but i think the error you are getting, is because there needs to be a comma after ] and before “runtimes”

1 Like

so cool ! you are right , I think I have to word hard to learn English.