How to Check If Docker Is Installed
Run Docker’s CLI version check in Terminal, PowerShell, or Command Prompt to check whether the Docker client is installed and available:
docker --version
A Docker version number confirms that your terminal can run the client, but it does not prove that the Docker Engine is running. To check the full installation, you’ll also need to test the connection to the Engine, the service that runs containers.
What a Docker Installation Check Tells You
Docker has separate components, so “installed” and “working” are different results:
- Docker CLI: The command-line client you use to issue Docker commands.
- Docker Engine: The background service, also called the daemon, that manages images and containers.
- Docker Desktop: The desktop application that bundles Docker tools and manages an Engine environment.
You can have the CLI installed without a running Engine. You can also have Docker Desktop installed while your terminal cannot find its CLI.
There is another important distinction: the CLI can connect to an Engine on another machine. A successful server check confirms that the selected Engine is reachable, not necessarily that an Engine is installed locally.
How to Check Whether Docker Is Installed
Step 1: Look for Docker Desktop
- Search your installed applications for Docker Desktop. A windowed interface or a whale icon in the menu bar or taskbar provides a quick visual check for Docker Desktop, according to Docker’s installation-identification guidance.
- If the app is present, open it and check its Engine status. An installed application is evidence of installation; its icon alone does not prove that the Engine is ready.
- If the application search is inconclusive, inspect its default installation location.
On macOS, Docker’s default Docker Desktop application is named Docker under /Applications, giving it the application path /Applications/Docker.app. Look for it in Finder.
On Windows, Docker’s default Docker Desktop installation is under C:\Program Files in a folder named Docker. Look for C:\Program Files\Docker in File Explorer.
On Linux, Docker Desktop’s default installation directory is /opt/docker-desktop.
Custom installation locations can produce false negatives, and leftover folders do not guarantee a working installation. If you intentionally use Docker Engine without Desktop, having no desktop application is normal.
Choose the terminal that matches the environment where you need Docker to work:
| Your Environment | Where to Run the Checks | What the Result Applies To |
|---|---|---|
| Native Windows | PowerShell or Command Prompt | Docker access from Windows |
| macOS | Terminal | Docker access from your macOS shell |
| Linux | Your terminal application | Docker access from that Linux environment |
| Windows with WSL | A terminal inside your WSL distribution | Docker access from that distribution |
Step 2: Check the Docker Client
- Open the appropriate terminal. If Docker was just installed, use a new terminal window so it receives updated environment settings.
- On Linux, macOS, or WSL shells that support aliases, check whether the Docker command has been redirected to another tool. This is part of Docker’s identification procedure for Docker Desktop and Docker Engine:
alias dockerAn alias targeting Podman, for example, means the shell is not invoking Docker directly. A “not found” response to this alias check simply means there is no alias with that name; it does not mean Docker is missing.
- Run the client version check:
docker --version
If it prints a Docker version number, the CLI is available in that terminal. This check does not require the Engine to be running.
If you receive command not found or “not recognized,” the terminal cannot find a usable Docker command. Docker may be absent, or its executable may be missing from PATH, the list of directories your shell searches.
Step 3: Check the Connected Docker Engine
- Request the client and server version information:
docker versionThe Client section describes the CLI. A populated Server section confirms that the CLI successfully contacted the selected Engine. If you see client details followed by a connection or permission error, the CLI exists, but the Engine check has failed. That is not proof that Docker needs reinstalling.
- Request Engine information:
docker system infoSuccessful output includes server details such as container and image counts, storage information, and the server’s operating environment. An error indicates that the Engine is not reachable with your current connection settings or permissions.
These checks establish whether the client is available and whether it can communicate with an Engine. Neither requires downloading or running a container.
How to Read Docker Version Output
The server label identifies the Docker environment you reached; the API version describes how the client communicates with it.
Docker Desktop Versus Docker Engine
Docker’s Docker Desktop identification example includes this server line:
Server: Docker Desktop 4.24.0 (122432)
That identifies the connected server as Docker Desktop. The version and build number are examples, not a required or current release; confirm your actual values in the Server line of your own version output.
A server label such as Server: Docker Engine - Community identifies the community Engine instead. Do not use the client label alone to distinguish Desktop from a standalone Engine installation, because both use the Docker CLI.
Client, Engine, and API Versions
The client and server can have different versions, especially when you connect to a remote Engine. A difference by itself does not mean the installation is broken.
The API version is a separate compatibility value. For example, Docker’s CLI version documentation uses Docker Engine version 27.5 with negotiated API version 1.47. These are different versioning schemes, not conflicting readings of the same component.
Confirm the actual client, Engine, and negotiated API values in your version output rather than comparing every number as though it should match.
What to Do If the Docker Check Fails
The Docker Command Is Not Found
First, close and reopen your terminal if you recently installed Docker. Then check whether your shell can locate the command.
On Linux, macOS, or WSL:
command -v docker
In Windows PowerShell:
Get-Command docker
A returned executable path shows where the shell resolves the command. On Unix-like shells, an alias or function may be reported instead, so inspect the result rather than assuming every match is an executable.
If no usable command appears:
- Docker Desktop is installed: Open the application. If the command remains unavailable, repair its CLI installation or
PATHintegration using Docker’s installation options for your operating system. - Docker works in Windows but not WSL: Enable Docker Desktop’s integration for the intended distribution under Settings > Resources > WSL Integration, apply the change, and open a new distribution terminal.
- Neither the application nor a CLI installation is present: Install Docker Desktop for a desktop workflow, or Docker Engine using the official installation instructions for your supported Linux distribution.
Finish by opening a new terminal and checking the client again:
docker --version
A version response confirms that command availability is fixed. It still does not establish Engine connectivity.
The Client Cannot Connect to the Docker Daemon
A connection error usually means the selected Engine is stopped, unreachable, or not the Engine you intended to use.
Inspect your Docker contexts:
docker context ls
The asterisk marks the selected context. Check its Docker endpoint: a remote endpoint means the connection problem may be on another machine rather than your laptop.
Also consider the DOCKER_HOST environment variable if you have configured it. An unintended value can direct commands to the wrong endpoint; starting your local Engine will not repair a connection aimed elsewhere.
For a local installation:
- If Docker Desktop manages your local Engine, open the application and wait until its Engine status shows that it is running.
- Standard Docker Engine on a Linux system using systemd: Check the service:
sudo systemctl is-active dockerIf the installed service is inactive and you intend to run it, start it:
sudo systemctl start docker
A missing system service does not rule out Docker Desktop or a rootless Engine, which have different service arrangements. These service commands also do not test a remote Engine.
After starting the intended Engine or correcting the connection configuration, verify access:
docker info
Server details confirm that the connection works. If an error remains, use its wording to distinguish a service-start failure, an unreachable endpoint, or a permission problem rather than repeatedly reinstalling the CLI.
Access to the Docker Socket Is Denied
A permission-denied error usually means the CLI found the Docker endpoint but your user cannot access it.
For a standard, local, rootful Docker Engine installation on Linux, test administrator access:
sudo docker info
If this succeeds while the unprivileged check fails, the Engine is available to the administrator and your user’s access needs attention. This comparison is meaningful only when both commands target the same Engine; administrator commands can use different environment settings or Docker configuration.
For ongoing access, use the authorized setup for your machine or organization. Membership in the docker group grants root-level privileges, so it is not merely a harmless convenience setting. Do not make the Docker socket writable by everyone to bypass the error.
An Installed Engine Cannot Run on an Old Linux Kernel
If the CLI exists but the Engine cannot start on an older Linux installation, inspect the kernel version:
uname -r
Docker’s daemon troubleshooting guidance identifies kernels older than version 3.10 as unable to run Docker correctly. Treat that as a historical lower boundary, not a guarantee that any newer kernel supports a current Docker release.
Current support also depends on your Linux distribution, kernel capabilities, and Docker release. If the operating system is unsupported, resolve that compatibility problem using a supported distribution and kernel before treating it as a missing Docker installation.
Confirm That Docker Can Run a Container
Client and server checks are enough to answer whether Docker is available and reachable. For an optional end-to-end check, run Docker’s test container against the Engine you intend to use:
docker run --rm hello-world
This command downloads the image if it is not already available, creates a container, prints a confirmation message, and removes the container after it exits. The downloaded image remains.
A successful “Hello from Docker!” message confirms that the selected Engine can create and run this test container. If the command fails while downloading the image, investigate network access, registry access, or proxy settings; a download failure does not establish that Docker is missing.
Remember that the container runs on the selected Engine, which may be remote. Once the test succeeds, you can run your project’s container commands against that verified environment.
Frequently Asked Questions
How Can I Check Whether Docker Engine Is Running in a Bash Script?
Test whether the current user can reach the selected Engine, and branch on the command’s exit status:
if docker info >/dev/null 2>&1; then
echo "Docker Engine is reachable"
else
echo "Docker Engine is not reachable"
fi
This checks usable Engine access rather than merely looking for a local process. A failed check can mean a missing CLI, a stopped Engine, an incorrect endpoint, or insufficient permissions.
How Can I Check the Status of My Docker Containers?
List all containers, including stopped ones, and inspect the STATUS column:
docker ps --all
An empty list means the selected Engine has no containers to display, not that Docker is uninstalled. An exited container can also be normal: a container stops when its main process finishes.
How Do I Check Whether Docker Images Transferred Correctly?
List the images on the destination Engine with full image IDs and available digests:
docker image ls --no-trunc --digests
Compare the expected repository, tag, and full image ID with the source; for a registry transfer, compare the expected digest when available. Matching identifiers verify image identity, but running the intended application is a separate test of whether the image works in the destination environment.
How Do I Check Whether Docker Is Running in Windows Command Prompt?
In Command Prompt, run docker –version to verify that the Docker command is available, then run docker version to test its connection to the Engine. Output with both Client and Server sections means the command reached the selected Engine. If you receive client information followed by a daemon connection error, the command-line client is present but the Engine is not reachable.
How Do I Check Whether Docker Compose Is Installed?
Run docker-compose –version in Command Prompt or PowerShell. An error-free response indicates that the Docker Compose command is available in that shell.
