- Add docker repo
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"- Update
sudo apt-get update- Check available versions
apt-cache madison docker-ceThe output will be like:
docker-ce | 17.06.0~ce-0~ubuntu-xenial | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
- Install appropriate package:
sudo apt-get install docker-ce=<VERSION>Example:
sudo apt-get install docker-ce=17.06.0~ce-0~ubuntu-xenial