Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

`DOCKER_HOST` without `unix://` prefix prints a confusing error: `Cannot connect to the Docker daemon at tcp://localhost:2375/foo.sock.`

Open
#5,846 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
docker, go
Domain
cli

Research direction

Reproduce the issue with DOCKER_HOST=/invalid.sock docker version and trace the Docker CLI entry point that parses DOCKER_HOST. The change is done when an invalid value reports the original value and explains the required unix:// or tcp:// prefix, with the relevant CLI tests passing.

Written by the indexing model from the issue text.

Description

area/ux exp/beginner kind/enhancement version/27.5
Description
$ DOCKER_HOST=/invalid.sock docker version
Client:
 Version:           27.5.1
 API version:       1.47
 Go version:        go1.22.11
 Git commit:        9f9e405
 Built:             Wed Jan 22 13:39:08 2025
 OS/Arch:           linux/arm64
 Context:           default
Cannot connect to the Docker daemon at tcp://localhost:2375/invalid.sock. Is the docker daemon running?

This error message is quite confusing, as the original invalid DOCKER_HOST value does not contain tcp://localhost:2375.
Probably it should return an error like invalid $DOCKER_HOST value "/invalid.sock": must start with "unix://" or "tcp://"

Dominant language
Go
Stars
6.1k
Forks
2.2k
Avg merge
1d 10h
Merged PRs (30d)
47

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from docker/cli

All issues in docker/cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.