Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 939
Alex Avatar asked Aug 02 '16 19:08

Alex


People also ask

Can you run Docker on Debian?

The docker service starts automatically on Debian based distributions. On RPM based distributions, such as CentOS, Fedora, RHEL or SLES, you need to start it manually using the appropriate systemctl or service command. As the message indicates, non-root users cannot run Docker commands by default.

Can I just install Docker CLI?

Can I just install the Docker CLI instead of using Docker Desktop? If you use a Mac, you can install Docker CLI and Engine inside a virtual machine, using VirtualBox or VMware Fusion for example, which may require purchasing a license for VirtualBox or VMware Fusion.

What Debian 10 Docker?

Docker is used for creating, deploying, and managing containers for application development. It uses OS virtualization to isolate containers and allow them to communicate with each other. In this tutorial, you will learn how to install Docker on Debian 10. Debian 10 installed and configured.


2 Answers

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
like image 86
GAD3R Avatar answered Oct 02 '22 20:10

GAD3R


Your dpkg architecture is probably using 32bit. You can check this using:

dpkg --print-architecture

Fix it by adding amd64 as a foreign architecture:

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

Update your package lists and check for docker-engine:

apt-get update
apt-cache policy docker-engine

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

like image 22
Mark Hoek Avatar answered Oct 02 '22 19:10

Mark Hoek