Start the Docker daemon
Published ยท Updated
On a Linux Docker Engine installation managed by systemd, start and inspect the service with:
sudo systemctl start docker
sudo systemctl status docker
Enable it at boot only if that matches the machine's role:
sudo systemctl enable docker.service
Then test the client and server with docker version or docker info. A daemon connection error can also come from the wrong Docker context or socket permissions, so check docker context show before starting random processes.
Rootless Docker has a different user service and must follow its own setup. Running dockerd by hand can create a second daemon with a different data directory and socket. If the service fails, read journalctl -u docker and fix the first configuration or storage error.
Start the Docker daemon on Linux with systemd
Use the commands above. systemctl status docker should show active (running). If you use Docker Engine without Docker Desktop, the daemon listens on /var/run/docker.sock. To let your user talk to it without sudo, add the user to the docker group and log in again.
Start the Docker daemon on macOS
macOS has no systemctl. Docker Desktop runs the engine inside a small virtual machine. Open Docker Desktop from Applications, or run open -a Docker in a terminal. Wait until the whale icon in the menu bar stops animating, then run docker info. Do not run dockerd on macOS.
Start the Docker daemon on Windows
Docker Desktop on Windows also runs the engine for you. Start Docker Desktop from the Start menu and wait for the status to read "Engine running". Docker Desktop uses the WSL 2 backend by default, so make sure WSL 2 is installed and enabled. Then run docker info in PowerShell. If you see "cannot connect to the Docker daemon", Docker Desktop is not running yet.
Sources
related.
Ruslan
About the author