For Latest Docker CE Versions
sudo apt-cache policy docker-ce
sudo apt-get install docker-ce=17.06.0~ce-0~ubuntu
or
sudo apt-get install docker-ce=17.06.0~ce-0~debian
For Older Docker Versions
sudo apt-cache policy docker-engine
sudo apt-get install docker-engine=1.13.1-0~ubuntu-xenial
or sudo apt-get install docker-engine=1.13.1-0~debian-jessie
https://medium.com/@gauravsj9/how-to-install-specific-docker-version-on-linux-machine-d0ec2d4095
https://docs.docker.com/install/linux/docker-ce/ubuntu/