Last updated: Apr 4, 2024
Reading time·3 min
The error "'docker' is not recognized as an internal or external command, operable program or batch file" occurs for 2 main reasons:
The easiest way to install Docker and add it to your PATH environment variable is to:
docker --version
command to make sure Docker is installed successfully.docker --version
docker
command. This is necessary for your PATH
environment variable to update.To open CMD as an administrator:
Click on the Search bar and type CMD.
Right-click on the Command Prompt application and click "Run as administrator".
Click on the Search bar and type "docker".
Right-click on "docker" under "Command" and click "Open file location".
For me the location is C:\Program Files\Docker\Docker\resources\bin
and it
will likely be similar to your path.
docker.exe
(executable) file.Click "New" and paste the path to the Docker executable that you previously copied.
You can use the "Move Down" button to move the Docker path to the bottom if it gets added at the top.
Click on "OK" twice to confirm the changes.
Close your Command prompt application and then reopen it.
You might also have to restart your PC, but that's not always necessary.
After restarting CMD, issue the docker --version
command to make sure Docker
is installed and configured properly.
docker --version
To solve the error "'docker' is not recognized as an internal or external command, operable program or batch file", make sure:
You can learn more about the related topics by checking out the following tutorials: