Search code examples
dockerdebiandocker-engine

Cannot install Docker on Debian Jessie


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

My versions are:

$ 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 doesn't find it either:

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

How might I resolve this?


Solution

  • Edit your sources.list and change the following line from:

    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 latest 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
    

    Maybe you will get an error , to fix it run:

    apt-get -f install
    dpkg -i docker-engine_1.9.1-0~jessie_amd64.deb