-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Description
Description
As per 19.03.1 (19.03.n), it's not possible anymore to use a local Docker Client to connect to a remote Docker Engine, via a http-proxy.
For versions previous to 19.03.n it was sufficient to set http_proxy and https_proxy (and an optionally no_proxy) in the local shell-environment to let the local Docker client connect to a remote Engine (or Docker UCP controller).
Since 19.03.n any Docker command towards a remote Engine throws a lookup error:
error during connect: Get https://foo.example.com:8443/v1.40/version: dial tcp: lookup foo.example.com no such host
Downgrading the docker client binary to 18.09 resolves the issue. So, it seems to be an issue in the client binary.
Steps to downgrade the client binary on macOS:
export DOCKERVERSION=18.09.8
curl -fsSLO https://download.docker.com/mac/static/stable/x86_64/docker-${DOCKERVERSION}.tgz && \
tar xzvf docker-${DOCKERVERSION}.tgz --strip 1 -C /usr/local/bin docker/docker && \
rm docker-${DOCKERVERSION}.tgz
Steps to undo the downgrade:
rm-v /usr/local/bin/docker && \
ln -s /Applications/Docker.app/Contents/Resources/bin/docker
Steps to reproduce the issue:
- Install 19.03.1 locally
- Setup a remote Docker Engine, accessible via a HTTP-proxy
- Configure proxy-settings in the local shell (
http_proxyandhttps_proxy, and to make it complete setHTTP_PROXYandHTTPS_PROXY) - Setup the local shell for the remote Engine (
DOCKER_TLS_VERIFY,DOCKER_HOST,DOCKER_CERT_PATH) - Run a docker command (eg.
docker ps) - See the error:
error during connect: Get https://foo.example.com:8443/v1.40/version: dial tcp: lookup foo.example.com: no such host
Describe the results you received:
Connecting to remote Docker instances throws an error:
error during connect: Get https://foo.example.com:8443/v1.40/version: dial tcp: lookup foo.example.com: no such host
Describe the results you expected:
Output for docker ps
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker version:
Client: Docker Engine - Community
Version: 19.03.1
API version: 1.40
Go version: go1.12.5
Git commit: 74b1e89
Built: Thu Jul 25 21:18:17 2019
OS/Arch: darwin/amd64
Experimental: false
error during connect: Get https://foo.example.com:8443/v1.40/version: dial tcp: lookup foo.example.com no such host
Output of docker info:
Client:
Debug Mode: false
Server:
Containers: 2
Running: 2
Paused: 0
Stopped: 0
Images: 136
Server Version: 19.03.1
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
runc version: 425e105d5a03fabd737a126ad93d62a9eeede87f
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 4.9.184-linuxkit
Operating System: Docker Desktop
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 5.818GiB
Name: docker-desktop
ID: JZS5:IGBZ:Y5UO:PLD7:LAGQ:6SRR:XNA3:MNS7:6KHR:V3DV:3Q4H:SVDD
Docker Root Dir: /var/lib/docker
Debug Mode: true
File Descriptors: 47
Goroutines: 62
System Time: 2019-08-02T11:33:31.433932824Z
EventsListeners: 2
HTTP Proxy: gateway.docker.internal:3128
HTTPS Proxy: gateway.docker.internal:3129
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
Additional environment details (AWS, VirtualBox, physical, etc.):
macOS 10.14 /w Docker for Mac 2.1.0.0