Cannot install Docker on Ubuntu 17.10
Solution 1
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
Solution 2
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 -
-
install the dependencies first
sudo apt install apt-transport-https ca-certificates curl software-properties-common
-
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 -
-
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"
-
verify if you are able to install Docker from Docker repository
apt-cache policy docker-ce
-
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
![saviour123](https://i.stack.imgur.com/KV7x5.jpg?s=256&g=1)
saviour123
Updated on September 18, 2022Comments
-
saviour123 almost 2 years
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.
-
George Udosen about 6 yearsI think it's not configured properly seeing this:
dpkg: error processing package docker-ce (--configure)
, so dosudo dpkg --configure -a
and see if it's up withsystemctl status docker
-
-
saviour123 about 6 yearsAfter this approach i have to use
sudo docker ..
-
Thalis K. over 4 years@saviour123
sudo usermod -aG docker <your_username>
should fix it.