How Do You Fix the Problem When You Get “docker command not found”?

Problem scenario
Docker is installed as far as you can tell on your Linux server.  You ran "sudo apt-get -y install docker" and it seemed to work.  When you run it again you see this:

"Building dependency tree
Reading state information... Done
docker is already the newest version (1.5-1+b1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
"

How do you get Docker to work when it seems installed but you get the error "docker command not found"?

Solution
If you have access to the internet, run this command:
sudo curl -sSL https://get.docker.com/ | sh

There are other ways of install Docker.  You may want to find a link below that is relevant to your situation:

How To Install Docker on an AWS Instance of RedHat Linux  (These directions use CentOS packages.)
How Do You Install Docker on an AWS Instance of RHEL?  (These directions use RHEL packages.)
How To Install Docker on an AWS Instance of SUSE Linux?
How To Install Docker on an AWS Instance of Ubuntu  (These directions do make changes to the Debian package repositories of your Linux server and use dockerproject.org and Ubuntu.com for the installation media.)
How Do You Install Docker on an AWS Instance of Ubuntu?  (These directions do not make changes to the Debian package repositories of your Linux server.)
How Do You Install Docker-Compose on a Linux Server?
How Do You Install Docker on a RHEL VM in Azure?
How Do You Install Docker on a GCP VM Running RHEL?
How Do You Install Docker on Debian 9 in GCP?

Leave a comment

Your email address will not be published. Required fields are marked *