Debian – Debug apt / Installing Docker – Unable to locate package docker-ce

aptdebiandocker

I have followed official instructions for Docker installation – Debian Jessie.

  • In /etc/apt/sources.list it says now,

    deb [arch=amd64] https://download.docker.com/linux/debian jessie stable

  • apt-get update seems to download packages correctly (output below)

  • but then, on apt-get install docker-ce, the system reports to be "unable to locate package docker-ce".

How can I debug what is happening? Never had this before.

Output of apt-get update:

Hit http://packages.dotdeb.org jessie InRelease
Hit http://security.debian.org jessie/updates InRelease
Hit http://packages.dotdeb.org jessie/all Sources
Hit http://security.debian.org jessie/updates/main Sources
Hit http://security.debian.org jessie/updates/contrib Sources
Hit http://packages.dotdeb.org jessie/all i386 Packages
Hit http://security.debian.org jessie/updates/main i386 Packages
Hit http://security.debian.org jessie/updates/contrib i386 Packages
Hit http://security.debian.org jessie/updates/contrib Translation-en
Hit https://download.docker.com jessie InRelease
Hit http://security.debian.org jessie/updates/main Translation-en
Ign http://http.debian.net jessie InRelease
Hit https://download.docker.com jessie/stable amd64 Packages
Hit http://http.debian.net jessie-updates InRelease
Hit http://http.debian.net jessie Release.gpg
Get:1 https://download.docker.com jessie/stable Translation-en_US [587 B]
Ign http://packages.dotdeb.org jessie/all Translation-en_US
Ign http://packages.dotdeb.org jessie/all Translation-en
Hit http://http.debian.net jessie-updates/main Sources
Get:2 https://download.docker.com jessie/stable Translation-en [584 B]
Hit http://http.debian.net jessie-updates/contrib Sources
Get:3 https://download.docker.com jessie/stable Translation-en_US [587 B]
Get:4 http://http.debian.net jessie-updates/main i386 Packages/DiffIndex [8,884 B]
Get:5 https://download.docker.com jessie/stable Translation-en [584 B]
Hit http://http.debian.net jessie-updates/contrib i386 Packages
Hit http://http.debian.net jessie-updates/contrib Translation-en
Get:6 https://download.docker.com jessie/stable Translation-en_US [587 B]
Get:7 http://http.debian.net jessie-updates/main Translation-en/DiffIndex [3,688 B]
Get:8 https://download.docker.com jessie/stable Translation-en [584 B]
Hit http://http.debian.net jessie Release
Get:9 https://download.docker.com jessie/stable Translation-en_US [587 B]
Hit http://http.debian.net jessie/main Sources
Get:10 https://download.docker.com jessie/stable Translation-en [584 B]
Hit http://http.debian.net jessie/contrib Sources
Hit http://http.debian.net jessie/main i386 Packages
Get:11 https://download.docker.com jessie/stable Translation-en_US [587 B]
Ign https://download.docker.com jessie/stable Translation-en_US
Hit http://http.debian.net jessie/contrib i386 Packages
Hit http://http.debian.net jessie/contrib Translation-en
Hit http://http.debian.net jessie/main Translation-en
Get:12 https://download.docker.com jessie/stable Translation-en [584 B]
Ign https://download.docker.com jessie/stable Translation-en

Best Answer

To install docker-ce on debian jessie:

After adding deb [arch=amd64] https://download.docker.com/linux/debian jessie stable to your /etc/sources.list. ( you don't need the software-properties-common package or the add-apt-repository command)

Install the required package:

sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl

Add the gpg key:

curl -fsSl https://download.docker.com/linux/debian/gpg | sudo apt-get key add -

Update and search for docker-ce package:

sudo apt-get update
apt-cache search docker-ce

Then install the docker-ce package:

sudo apt-get install docker-ce
Related Question