СHRISTMAS
WHEEL OF FORTUNE

Tap the button and win a guaranteed prize right now!

By registering, you are signing up to receiving e-mails.
JT
December 1 2024
Updated December 1 2024

Docker not found: how to solve the error?

Linux Windows

In this article we will consider a problem related to Docker, which gives the error ‘docker not found’, ‘docker compose not found’, ‘docker command not found’ and others. It is mostly related to either incorrect installation and missing paths in environment variables to the file, or incorrect use of the command.

How to quickly run a check and fix Docker not found error? Let's go through the checklist in order and in the process we will be able to identify the source of the problem!

Absence of needed packet

This error can occur when there is no software installed on the machine - make sure you have it. For Ubuntu and Linux-like distributions, you can check via the command:

apt list | grep 'docker' | grep 'installed'
Search Docker
Screenshot №1 — Search Docker

For Windows, you need to use the terminal utility Win+X → Terminal/PowerShell → winget:

winget list | Where-Object { $_ -match 'Docker' }
Windows search for Docker
Screenshot №2 — Windows search for Docker

The command will list the installed software and the filter command will find mentions of Docker. If the required applications are missing, install them by specifying the installation package on Windows:

winget install Docker.DockerDesktop
Docker installation
Screenshot №3 — Docker installation

Or for Ubuntu and Linux-like operating systems you should use:

apt install docker.io docker-compose -y

Remove any unnecessary software from the command above that doesn't suit you, the remaining dependencies will be listed in the package and downloaded automatically.

Incorrectly invoked application

Not always the commands to work for utilities and software are called the same, often it can be different commands or missing permissions on it. For example, reboot on Linux:

Incorrect software invocation
Screenshot №4 — Incorrect software invocation

This is why you need to run commands as Administrator, in Linux check that you have sudo rights:

sudo -l

If you are not there, add rights by running the command as root, first replace user with your login:

usermod -aG sudo user && sudo docker

In Windows, run Win+X → Terminal/PowerShell (Administrator) → docker. If this solution does not work, then use the command guides:

apt show docker-ce
Show packet info
Screenshot №5 — Show packet info

Or for Windows you need to use the command:

winget show Docker.DockerDesktop

Where you can go to the package developer's site and find the command you need, but for Docker it is the same name, i.e. the docker command.

No entry in environment variables

To realise the solution to this problem let's write a new path to the folder with Docker on Linux and Windows, for this purpose find the place where the executable file lies:

grep -r / 'docker'
Search for Docker
Screenshot №6 — Search for Docker

And in Windows classically search by folder via Win+E → Search, then copy the path found and for Linux write:

echo 'PATH=$PATH=$PATH:/home/user/docker' | sudo tee /etc/environment
New variable
Screenshot №7 - New variable

For Windows, open a search on the Win key and type ‘Environments’ or ‘Variables’ where you select the desired one:

Windows Search
Screenshot №8 - Windows Search

Once again, select Environment Variables and type in your own or in the system environment variable parameter:

New variable for Windows
Screenshot №9 - New variable for Windows

And write a new path there, after which we will restart the device and check if it works!

Docker
Screenshot №10 - Docker

Great, the software is running and ready to work! These steps should solve the main causes of this problem, they are also suitable for other software!

As a result of executing these commands you should get a list of parameters of the requested objects. If you don't have sufficient resources than you can perform actions on powerful cloud servers. Serverspace provides isolated VPS / VDS servers for common and virtualize usage.

Create Server
Screenshot №11 — Create Server
Vote:
5 out of 5
Аverage rating : 5
Rated by: 1
33145 North Miami, FL 2520 Coral Way apt 2-135
+1 302 425-97-76
700 300
ITGLOBAL.COM CORP
700 300

You might also like...

We use cookies to make your experience on the Serverspace better. By continuing to browse our website, you agree to our
Use of Cookies and Privacy Policy.