Skip to content

Cannot install docker-ce on Ubuntu 16.04 #36510

@Igor-Gold

Description

@Igor-Gold

Description

I'm having great difficulty installing docker-ce on my machine after many attempts over the course of several days.

Steps to reproduce the issue:

  1. Remove all instances of any old docker installations.
  2. Follow instructions on website to install docker-ce on Ubuntu.

apt install docker-ce

Selecting previously unselected package docker-ce.
(Reading database ... 206907 files and directories currently installed.)
Preparing to unpack .../docker-ce_18.02.0~ce-0~ubuntu_amd64.deb ...
Unpacking docker-ce (18.02.0~ce-0~ubuntu) ...
Processing triggers for systemd (229-4ubuntu21.1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up docker-ce (18.02.0~ce-0~ubuntu) ...
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 Wed 2018-03-07 06:27:53 EST; 4ms ago
     Docs: https://docs.docker.com
  Process: 17990 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
 Main PID: 17990 (code=exited, status=1/FAILURE)

Mar 07 06:27:53 IgorPC systemd[1]: Failed to start Docker Application Conta...e.
Mar 07 06:27:53 IgorPC systemd[1]: docker.service: Unit entered failed state.
Mar 07 06:27:53 IgorPC systemd[1]: docker.service: Failed with result 'exit...'.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package docker-ce (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 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: inactive (dead) (Result: exit-code) since Wed 2018-03-07 06:27:54 EST; 3min 4s ago
     Docs: https://docs.docker.com
  Process: 18175 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
 Main PID: 18175 (code=exited, status=1/FAILURE)

Mar 07 06:27:54 IgorPC systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Mar 07 06:27:54 IgorPC systemd[1]: Failed to start Docker Application Container Engine.
Mar 07 06:27:54 IgorPC systemd[1]: docker.service: Unit entered failed state.
Mar 07 06:27:54 IgorPC systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 07 06:27:54 IgorPC systemd[1]: docker.service: Service hold-off time over, scheduling restart.
Mar 07 06:27:54 IgorPC systemd[1]: Stopped Docker Application Container Engine.
Mar 07 06:27:54 IgorPC systemd[1]: docker.service: Start request repeated too quickly.
Mar 07 06:27:54 IgorPC systemd[1]: Failed to start Docker Application Container Engine.

journalctl -xe

-- 
-- Unit docker.service has failed.
-- 
-- The result is failed.
Mar 07 06:27:54 IgorPC systemd[1]: docker.service: Unit entered failed state.
Mar 07 06:27:54 IgorPC systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 07 06:27:54 IgorPC systemd[1]: docker.service: Service hold-off time over, scheduling restart.
Mar 07 06:27:54 IgorPC systemd[1]: Stopped Docker Application Container Engine.
-- Subject: Unit docker.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit docker.service has finished shutting down.
Mar 07 06:27:54 IgorPC systemd[1]: Closed Docker Socket for the API.
-- Subject: Unit docker.socket has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit docker.socket has finished shutting down.
Mar 07 06:27:54 IgorPC systemd[1]: Stopping Docker Socket for the API.
-- Subject: Unit docker.socket has begun shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit docker.socket has begun shutting down.
Mar 07 06:27:54 IgorPC systemd[1]: Starting Docker Socket for the API.
-- Subject: Unit docker.socket has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit docker.socket has begun starting up.
Mar 07 06:27:54 IgorPC systemd[1]: Listening on Docker Socket for the API.
-- Subject: Unit docker.socket has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit docker.socket has finished starting up.
-- 
-- The start-up result is done.
Mar 07 06:27:54 IgorPC systemd[1]: docker.service: Start request repeated too quickly.
Mar 07 06:27:54 IgorPC systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit docker.service has failed.
-- 
-- The result is failed.
Mar 07 06:27:54 IgorPC systemd[1]: docker.socket: Unit entered failed state.
Mar 07 06:27:55 IgorPC sudo[16472]: pam_unix(sudo:session): session closed for user root
Mar 07 06:30:17 IgorPC pkexec[18672]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
Mar 07 06:30:17 IgorPC pkexec[18672]: pam_systemd(polkit-1:session): Cannot create session: Already running in a session
Mar 07 06:30:17 IgorPC pkexec[18672]: igor: Executing command [USER=root] [TTY=unknown] [CWD=/home/igor] [COMMAND=/usr/lib/update-notifier/p
Mar 07 06:32:18 IgorPC AptDaemon[12353]: INFO: Quitting due to inactivity
Mar 07 06:32:18 IgorPC AptDaemon[12353]: INFO: Quitting was requested
Mar 07 06:32:18 IgorPC org.debian.apt[997]: 06:32:18 AptDaemon [INFO]: Quitting due to inactivity
Mar 07 06:32:18 IgorPC org.debian.apt[997]: 06:32:18 AptDaemon [INFO]: Quitting was requested

Additional information you deem important (e.g. issue happens only occasionally):

I've tried installing this on several kernels: 4.13, 4.10, and 4.4. None of them seemed to work.

I was able to boot up an Ubuntu VM and install via the getDocker.sh script successfully.

Running that script on my machine yields me this:

# Executing docker install script, commit: fc04d2c
+ sudo -E sh -c apt-get update -qq >/dev/null
+ sudo -E sh -c apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sudo -E sh -c curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | apt-key add -qq - >/dev/null
+ sudo -E sh -c echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial edge" > /etc/apt/sources.list.d/docker.list
+ [ ubuntu = debian ]
+ sudo -E sh -c apt-get update -qq >/dev/null
+ sudo -E sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
E: Sub-process /usr/bin/dpkg returned an error code (1)

Output of docker version:

Client:
 Version:	18.02.0-ce
 API version:	1.36
 Go version:	go1.9.3
 Git commit:	fc4de44
 Built:	Wed Feb  7 21:16:33 2018
 OS/Arch:	linux/amd64
 Experimental:	false
 Orchestrator:	swarm
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Output of docker info:

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Additional environment details (AWS, VirtualBox, physical, etc.):

  • Physical Machine
  • Ubuntu 16.04.1
  • Kernel 4.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions