check docker-ce version code example
Example 1: install docker ubuntu
sudo apt install docker.io
Example 2: docker ubuntu installation
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt install docker.io
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -