Docker daemon is not running
The Docker command-line client cannot establish a connection because the background Docker daemon process is not running on the system.
Usually happens because:
- ☑ Docker service is stopped or disabled
- ☑ Virtual machine virtualization crash
- ☑ Resource depletion (out of memory)
🔍 Quick Checklist:
What is Docker daemon is not running?
This error occurs when you invoke docker commands but the background engine service (dockerd) has not been initialized or was terminated. The Docker client acts only as a frontend command parser; the actual heavy lifting (building, running, and managing containers) is done by the daemon. When the daemon is stopped, the CLI cannot route your commands and displays this warning.
Common Causes
- Docker service not enabled on boot: The host machine started up but did not boot the daemon.
- Docker Desktop engine stopped: The Docker Desktop GUI is inactive on macOS/Windows.
- Insufficient system resources: The virtual machine running Docker ran out of memory or CPU and crashed.
| Cause | Frequency |
|---|---|
| Docker service not enabled on boot | ⭐⭐⭐⭐⭐ |
| Docker Desktop engine stopped | ⭐⭐⭐⭐ |
| Virtualization memory crash | ⭐⭐⭐ |
Common Mistakes
- Assuming the daemon is running just because the Docker CLI is installed.
- Forgetting to start the WSL2 backend before invoking commands from bash terminals on Windows.
How to Fix
Docker Operations & Verification
Inspect the systemd logs to see why the Docker daemon failed to run.
sudo journalctl -u docker -n 50 --no-pagerPlatform Specific Fixes
Commands to enable and start the service on systemd Linux distributions.
sudo systemctl enable docker
sudo systemctl start dockerBest Practices
- Set the Docker service to run automatically on system boot.
- Ensure your local virtual machine has at least 4GB of RAM allocated to prevent daemon out-of-memory crashes.
Frequently Asked Questions (FAQ)
Q: How do I check if the Docker daemon is running?
Run `docker info` in your terminal. If the daemon is running, it will output system information; otherwise, it will show the daemon is not running error.
Q: Why does my Docker daemon keep stopping?
It is usually due to resource constraints. Check your host's free memory and review Docker Desktop logs for OOM (Out of Memory) crash indications.
Q: How do I start Docker daemon on boot?
On Linux, run `sudo systemctl enable docker`. On Windows or macOS, check the 'Start Docker Desktop when you log in' box in the application settings.
Q: Can I run Docker without the daemon?
No. The Docker CLI depends completely on the daemon to perform all containerization operations.