Docker client doesn't respect ALL_PROXY for any command
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
Description
Trying to issue docker client commands such as docker ps, docker images, docker run, etc. through a proxy to a remote daemon server.
docker ps seems to be respecting HTTP_PROXY env, but none of the commands respect ALL_PROXY settings.
Steps to reproduce the issue:
- Run a remote docker daemon on port 2376 with TLS enabled on machine A
- Configure
iptablesof machine A to only accepts connections on port 2376 from machine B. - Setup a socks/https proxy (I'm using shadowsocks) on machine B.
- Run the command below on machine C to issue a docker command to A through B's proxy.
ALL_PROXY=socks5://127.0.0.1:1080 DOCKER_HOST=tcp://xx.xx.xx.xx:2376 docker images
Describe the results you received:
Cannot connect to the Docker daemon at tcp://xx.xx.xx.xx:2376. Is the docker daemon running?
Describe the results you expected:
List of images on machine A
Additional information:
docker pswill correctly work as expected with HTTP_PROXY but not ALL_PROXY.- Many commands like
docker imageswon't work on HTTP_PROXY either. - After allowing connections from every client to port 2376 on machine A,
docker imageswas working as expected. Meaning it doesn't respect proxy settings.
Output of docker version:
Client:
Version: 17.12.0-ce
API version: 1.35
Go version: go1.9.2
Git commit: c97c6d6
Built: Wed Dec 27 20:10:36 2017
OS/Arch: linux/amd64
Cannot connect to the Docker daemon at tcp://47.91.72.126:2376. Is the docker daemon running?
# This is the actual version of the server.
Server:
Engine:
Version: 17.12.0-ce
API version: 1.35 (minimum version 1.12)
Go version: go1.9.2
Git commit: c97c6d6
Built: Wed Dec 27 20:12:46 2017
OS/Arch: linux/amd64
Experimental: false
Output of docker info (without running through proxy):
Containers: 5
Running: 0
Paused: 0
Stopped: 5
Images: 132
Server Version: 17.12.0-ce
Storage Driver: overlay
Backing Filesystem: extfs
Supports d_type: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 89623f28b87a6004d4b785663257362d1658a729
runc version: b2567b37d7b75eb4cf325b77297b140ea686ce8f
init version: 949e6fa
Security Options:
seccomp
Profile: default
selinux
Kernel Version: 3.10.0-693.11.6.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 1.796GiB
Name: xxxxxx.internal
ID: xxxxx
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Additional environment details:
Docker host is installed on bare metal.
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 reported command with ALL_PROXY, DOCKER_HOST, and a remote TLS daemon, then compare it with the stated HTTP_PROXY behavior across docker client commands. Trace the Docker CLI's proxy handling for remote daemon connections. Done means commands such as docker images consistently use ALL_PROXY and return the remote daemon's results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100