docker command not found even though installed with apt-get – Docker

Photo of author
Written By M Ibrahim
boot2docker ubuntu-14.04

Quick Fix: Instead of docker , install docker-ce package to get the Docker DevOps tool using sudo apt-get install docker-ce docker-ce-cli containerd.io command.

The Solutions:

Solution 3: Use sudo apt-get install docker-ce to install Docker

The problem here is that after installing Docker using sudo apt-get install docker, you are trying to run the docker command, which is not found. This is because the Docker package installed with sudo apt-get install docker is not the correct one.

The package you should install is docker-ce, which is the Community Edition of Docker. To install it, use the following command:

sudo apt-get install docker-ce

Once you have installed docker-ce, you should be able to run the docker command without any problems.

Solution 4: Use “sudo apt install docker.io”

If you want an easy way to install Docker, you can use the following command:

$ sudo apt install docker.io

This command will install Docker on your system. After the installation is complete, you can check if Docker is working properly by typing the following command:

$ docker