Can't Install Docker on Debian Jessie

Despite trying to use the official installation mechanism using the new apt repo described here , as well as the curl -fsSL https://get.docker.com/ | sh route curl -fsSL https://get.docker.com/ | sh curl -fsSL https://get.docker.com/ | sh , I still get E: Unable to locate package docker-engine from APT when I try apt-get install docker-engine .

My versions:

 $ uname -a Linux blah 4.5.5-x86_64-linode69 #3 SMP Fri May 20 15:25:13 EDT 2016 x86_64 GNU/Linux $ lsb_release -c Codename: jessie $ cat /etc/debian_version 8.5 $ cat /etc/apt/sources.list deb http://ftp.uk.debian.org/debian/ stable main contrib non-free deb-src http://ftp.uk.debian.org/debian/ stable main deb http://security.debian.org/ stable/updates main deb-src http://security.debian.org/ stable/updates main deb http://http.debian.net/debian wheezy-backports main 

The only file in my /etc/apt/sources.list.d is docker.list , which contains:

 deb https://apt.dockerproject.org/repo debian-jessie main 

apt-cache policy docker-engine does not find it:

 apt-cache policy docker-engine N: Unable to locate package docker-engine 

How can i solve this?

+7
docker debian docker-engine
source share
4 answers

Edit sources.list and change the following line:

 deb http://http.debian.net/debian wheezy-backports main 

to

 deb http://ftp.debian.org/debian jessie-backports main 

Update and install docker :

 apt-get update apt-get install docker.io 

Edit

To install a specific version of docker-engine download the .deb package from here , e, g the last one is docker-engine_1.9.1-0~jessie_amd64.deb :

 wget https://apt.dockerproject.org/repo/pool/main/d/docker-engine/docker-engine_1.9.1-0~jessie_amd64.deb sudo apt-get update dpkg -i docker-engine_1.9.1-0~jessie_amd64.deb 

You may receive an error message:

 apt-get -f install dpkg -i docker-engine_1.9.1-0~jessie_amd64.deb 
+7
source share

Maybe your dpkg architecture uses 32bit . You can verify this using:

 dpkg --print-architecture 

Fix it by adding amd64 as an external architecture:

 dpkg --add-architecture amd64 dpkg --print-foreign-architectures 

Update your package lists and check out the docker-engine :

 apt-get update apt-cache policy docker-engine 

Source: https://wiki.debian.org/Multiarch/HOWTO

+4
source share

Login as root

 $ sudo su 

Create this file if it does not exist:

 # vi /etc/apt/sources.list.d/backports.list 

Add this as the contents of your backports.list

  deb http://http.debian.net/debian jessie-backports main 

Now do apt-get update

 # apt-get update 

Install CA Certificates

  # apt-get install apt-transport-https ca-certificates 

Add New GPG Key

 # apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D 

Now open /etc/apt/sources.list.d/docker.list (or create when it does not exist)

 # vi /etc/apt/sources.list.d/docker.list 

Add as content:

 deb https://apt.dockerproject.org/repo debian-jessie main 

Re-upgrade:

 # apt-get update 

Make sure APT pulls from the right repository.

 # apt-cache policy docker-engine 

Refresh again

 # sudo apt-get update 

Install Docker:

 # sudo apt-get install docker-engine 

Launch the docker daemon.

 # sudo service docker start 

Make sure docker is installed correctly.

 # sudo docker run hello-world 
+2
source share

Hi guys, I ran into the same problem and recently discovered that the script automated the process of installing dockers in debian 8. Here you can see the fragment ( https://gist.github.com/frgomes/a6f889583860f5b330c06c8b46fa0f42 ). Credit is sent to the original creator of the script.

I add this on line 4 to remove old versions of Docker, if they exist:

 sudo apt-get remove docker docker-engine 

and a few lines in line 7:

 sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common -y 

Then as superuser:

 # chmod +x ./install-docker.sh # sudo ./install-docker.sh 

And you will get the latest docker instead of v 1.5-1:

 # docker --version Docker version 17.05.0-ce, build 89658be 
+1
source share

All Articles