Install Docker CE on Ubuntu 18.04
Please follow the steps mentioned below:
- sudo apt remove docker docker-engine docker.io. (Remove older version of docker).
- sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg (Check and install necessary packages).
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add – (Add docker’s GPG).
- sudo apt-key fingerprint 0EBFCD88 (Verify fingerprint).
- sudo add-apt-repository “deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable”(Add the stable docker repository).
- sudo apt update
sudo apt install docker-ce (Update your packages and install Docker CE). - Now run the command “which docker”. Directory where the docker resides will appear.

Also, you can run the command “docker –version” to confirm the docker installation.