Here is the method to have Docker and Docker Compose installed on your Debian 9 system. This is a shortened version of the official one so it can be easily copy/paste.


I have made a small bash script to automate this installation process. You could find it on my Github.

Docker installation


Update the apt index and install the needed packages

apt update
apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common

Add & check Docker GPG key

curl -fsSL | apt-key add -

Check that the correct key have been added

apt-key fingerprint 0EBFCD88

Add the Debian official repository

Add the stable repository for 64bits system

add-apt-repository "deb [arch=amd64] $(lsb_release -cs) stable"


Update the apt index once more, and install Docker CE and containerd

apt update
apt install docker-ce docker-ce-cli

Verify that Docker CE is installed and can run images

docker run hello-world


What is Docker Compose

Download the Docker Compose binary

curl -L "$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

Copy binary

Grant execution privileges on the downloaded binary

chmod +x /usr/local/bin/docker-compose

Check that the binary is working properly

docker-compose --version