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:
For Windows, you need to use the terminal utility Win+X → Terminal/PowerShell → winget:
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:
Or for Ubuntu and Linux-like operating systems you should use:
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:
This is why you need to run commands as Administrator, in Linux check that you have sudo rights:
If you are not there, add rights by running the command as root, first replace user with your login:
In Windows, run Win+X → Terminal/PowerShell (Administrator) → docker. If this solution does not work, then use the command guides:
Or for Windows you need to use the command:
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:
And in Windows classically search by folder via Win+E → Search, then copy the path found and for Linux write:
For Windows, open a search on the Win key and type ‘Environments’ or ‘Variables’ where you select the desired one:
Once again, select Environment Variables and type in your own or in the system environment variable parameter:
And write a new path there, after which we will restart the device and check if it works!
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.