9 Steps to install Docker on Ubuntu 18.04 1.Remove any Docker files that are running in the system, using the following command: sudo apt-get remove docker docker-engine docker.io 2. Check if the system is up-to-date: sudo apt-get update 3. Install Docker sudo apt install docker.io 4. Install all the dependency packages sudo snap install docker 5. Before testing Docker, check the version installed docker --version 6. Pull an image from the Docker hub sudo docker run hello-world 7. Check if the docker image has been pulled and is present in your system sudo docker images 8. Display all the containers pulled sudo docker ps -a 9. Check for containers in a running state sudo docker ps Source