2

So, a whole day has been spend trying to install docker. This is the error i keep getting. I used the official approach from docker, and also tried the digital ocean installation guide.

Setting up docker-ce (18.04.0~ce~3-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 Thu 2018-04-19 17:33:13 GMT; 10ms ago
     Docs: https://docs.docker.com
  Process: 6283 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE) ## i suspect this line in service file
 Main PID: 6283 (code=exited, status=1/FAILURE)
      CPU: 201ms

Apr 19 17:33:13 sav-subsystems systemd[1]: docker.service: Unit entered failed state.
Apr 19 17:33:13 sav-subsystems systemd[1]: docker.service: Failed with result 'exit-code'.
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)

After restarting and journaling the error: I got this ->

-- Unit docker.socket has begun starting up.
Apr 19 17:37:30 sav-subsystems systemd[1]: Listening on Docker Socket for the API.
-- Subject: Unit docker.socket has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit docker.socket has finished starting up.
-- 
-- The start-up result is done.
Apr 19 17:37:30 sav-subsystems systemd[1]: docker.service: Start request repeated too quickly.
Apr 19 17:37:30 sav-subsystems systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit docker.service has failed.
-- 
-- The result is failed.
Apr 19 17:37:30 sav-subsystems systemd[1]: docker.socket: Unit entered failed state.
Apr 19 17:37:30 sav-subsystems systemd[1]: docker.service: Unit entered failed state.
Apr 19 17:37:30 sav-subsystems systemd[1]: docker.service: Failed with result 'exit-code'.

I also download a debian package and installed, it also failed.

1
  • 1
    I think it's not configured properly seeing this: dpkg: error processing package docker-ce (--configure), so do sudo dpkg --configure -a and see if it's up with systemctl status docker Apr 20, 2018 at 12:25

2 Answers 2

2

I was able to install it using this page steps: https://gist.github.com/levsthings/0a49bfe20b25eeadd61ff0e204f50088

sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu zesty stable"

sudo apt-get update
sudo apt-get install docker-ce
2
  • After this approach i have to use sudo docker ..
    – saviour123
    Apr 20, 2018 at 14:45
  • 1
    @saviour123 sudo usermod -aG docker <your_username> should fix it.
    – thalisk
    Jan 16, 2020 at 22:04
1

Can you check if the docker -ce was installed and service is running .. sometimes if you try multiple installations,, it may throw this type of error. If so, uninstall and try to install following steps from this tutorial -

Essentially you will run following commands -

  1. install the dependencies first

     sudo apt install apt-transport-https ca-certificates curl software-properties-common
    
  2. add the GPG key for the official Docker repository to the system:

    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    
  3. Add the Docker repository in sources.list.d to APT sources using below command

    sudo add-apt-repository "deb [arch=amd64] 
    https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable edge"
    
  4. verify if you are able to install Docker from Docker repository

    apt-cache policy docker-ce
    
  5. Finally, install Docker CE package with below command

    sudo apt-get install -y docker-ce
    

Voila, you have installed Docker-CE. you can verify installation by checking the version of docker-ce installed

docker --version

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .