Follow this section at the Docker CE offcial docs : https://docs.docker.com/install/linux/docker-ce/ubuntu/
Notes:
1. when using following command to install docker ce .will be appear docker-ce-cli not found . ,my solution is removing "docker-ce-cli=<VERSION_STRING>" from following command . and you can also reference https://stackoverflow.com/questions/54471543/e-version-18-06-1ce3-0ubuntu-for-docker-ce-cli-was-not-found
$ sudo apt-get install docker-ce=<VERSION_STRING> docker-ce-cli=<VERSION_STRING> containerd.io
2. using non root permission to using docker command .
sudo groupadd docker;sudo usermod -aG docker $USER