Interview Prep/Docker/Daemon, install and permissions

`Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?`

BeginnerTroubleshootingDaemon, install and permissions
Answer

Likely causes → dockerd is stopped, crashed, not installed, or DOCKER_HOST/context points elsewhere.

Diagnose →

systemctl status docker
journalctl -u docker --no-pager -n 50
echo $DOCKER_HOST; docker context ls

Fix → sudo systemctl enable --now docker. Unset a stale DOCKER_HOST or docker context use default. On Docker Desktop start the app.

Prevent → Enable the service at boot and monitor it.

All Docker questions Roadmap: Docker & containers

More on Daemon, install and permissions