-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Description
Is this a docs issue?
- My issue is about the documentation content or website
Type of issue
Information is incorrect
Description
Problem
The official Linux install docs now recommend Docker Desktop. After a fresh Desktop install on Linux, the docker CLI works (desktop-linux context), but SDKs and tools that expect /var/run/docker.sock
(or an unset DOCKER_HOST
) fail with:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock.
Desktop for Linux doesn’t bind /var/run/docker.sock by default; it uses a per-user socket (desktop-linux context). The default context is just the CLI’s legacy placeholder. This is not an issue on macOS or Windows Desktop. Prior user confusion: docker/for-linux#1376.
Reproduction
- Install Docker Desktop for Linux from official docs.
docker run hello-world
works.- Run Go or Python SDK code (default config) → cannot connect.
export DOCKER_HOST=$(docker context inspect desktop-linux --format '{{ .Endpoints.docker.Host }}')
fixes the SDK.
Impact
SDKs and tools fail until users manually export DOCKER_HOST; current docs don’t mention this.
Location
https://docs.docker.com/desktop/
Suggestion
Add a Linux note in:
- Desktop > Install > Linux (post-install / next steps)
- Desktop > Troubleshoot > Known issues
Snippet:
export DOCKER_HOST=$(docker context inspect desktop-linux --format '{{ .Endpoints.docker.Host }}')
Explanation:
"Docker Desktop for Linux does not bind /var/run/docker.sock by default. It uses a per-user socket (desktop-linux context); SDKs and tools need DOCKER_HOST exported."
Optionally note adding the export to the user’s shell profile and link from language SDK docs.