Debian installation.
- check your ubuntu code name
lsb_release -a | grep Code
Codename: xenial
- check your cpu architecture
lscpu | grep Arch
Architecture:x86_64
Finaly download your debian src.Go to https://download.docker.com/linux/ubuntu/dists/, choose your Ubuntu version, browse to pool/stable/ and choose amd64, armhf, ppc64el, or s390x. Download the .deb file for the Docker version you want to install.
sudo dpkg -i /path/to/package.deb
docker -v
Docker version 18.06.0-ce