On remote connect failure, docker erronously refers to "docker.example.com"
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
Description
When trying to connect to a remote host, and the connection fails for whatever reason, it returns the error:
Error pinging Docker server: Cannot connect to the Docker daemon at http://docker.example.com. Is the docker daemon running?
I spent way too much time trying to figure out why docker was trying to connect to docker.example.com instead of my desired host, not realizing someone had just been lazy and chose not to write a proper error message.
Reproduce
- Set DOCKER_HOST to a valid server you can login to but doesn't have docker installed. eg: ssh://user@myserver.local
- Use any docker cli command, or the python library, to interact with docker
Expected behavior
No response
docker version
Client: Docker Engine - Community
Version: 27.3.1
API version: 1.47
Go version: go1.22.7
Git commit: ce12230
Built: Fri Sep 20 11:40:59 2024
OS/Arch: linux/amd64
Context: default
docker info
Client: Docker Engine - Community
Version: 27.3.1
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.17.1
Path: /usr/libexec/docker/cli-plugins/docker-buildx
Additional Info
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure by setting DOCKER_HOST to an SSH host without Docker installed and running any Docker CLI command. Trace the CLI connection error path and identify where the placeholder host is introduced; done means the error identifies the configured remote host or otherwise gives an accurate connection failure message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100