Docker is a set of platform as a service products that use OS-level virtualization to deliver software in packages called containers. You can references to documents at this https://www.docker.com/ .

Step 1: Need to update software repositories. Run the following command:

sudo apt-get update

Step 2: Install Docker on Ubuntu 18.04

To install latest version you can run command

sudo apt install docker-ce docker-ce-cli containerd.io

To install specific version docker

apt list -a docker-ce

Output

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/a8e8b66d-b1f0-4169-a412-b7e1f6a1849e/Untitled.png

Then install specific version

sudo apt install docker-ce=<VERSION> docker-ce-cli=<VERSION> containerd.io

You can verify Docker service after install. It is start automation when install completed

sudo systemctl status docker

Output

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/b8e39b42-fbf4-458a-b09b-243de935af32/Untitled.png