Docker Tip #77: Installing Docker on Debian Unstable

Installing Docker on Debian is normally a straight forward task, but if you want to use the unstable release you need to make a change.
Part of Docker’s installation steps involves adding their apt repository by running:
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable"
On Debian stable, lsb_release -cs
will report back jessie
, stretch
, buster
or whatever happens to be the latest stable release. But on Debian unstable, that returns sid
and Docker does not have an official repo set up for that release so it will fail.
Fixing the Docker installation error:
You can get around that by replacing $(lsb_release -cs)
with stretch
or whatever the latest stable release is and then continue installing Docker as usual. It works just fine.
Fixing an unexpected Docker Compose error:
If you happen to try and pip install --user docker-compose
you may encounter an error of ImportError: No module named ssl_match_hostname
whenever you run any Docker Compose command, such as docker-compose --version
.
You can fix that by running sudo apt-get install python-backports.ssl-match-hostname
.