Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker.for.win.localhost does not enable cntlm proxy listening on host #1130

Closed
alanmpitts opened this issue Sep 26, 2017 · 5 comments
Closed

Comments

@alanmpitts
Copy link

Expected behavior

  • Install and properly configure cntlm proxy listening on the standard port and gateway enabled.
  • Install Docker 4 Windows on a Windows 10 Enterprise Version 1607 Build 14393.1480
  • Go to Docker 4 Windows manual proxy settings and enter http://docker.for.win.localhost:3128 for both the http and https proxy settings.
  • able to login to docker hub using "docker login"

Actual behavior

With http://docker.for.windows.localhost:3128 set for the docker proxy. I get the following when I issue the command "docker login"

Error response from daemon: Get https://registry-1.docker.io/v2/: proxyconnect tcp: dial tcp: lookup docker.for.win.10.0
.75.1 on 192.168.65.1:53: no such host

Information

I have noticed that the docker engine has translated the proxy settings to http://docker.for.windows.10.0.75.1:3128

Here is docker info:

Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 0
Server Version: 17.06.2-ce
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 logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 6e23458c129b551d5c9871e5174f6b1b7f6d1170
runc version: 810190ceaa507aa2727d7ae6f4790c76ec150bd2
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.41-moby
Operating System: Alpine Linux v3.5
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.934GiB
Name: moby
ID: YQNT:64YW:ANCU:MVVQ:A2KC:F7KL:RLXH:MN73:2HV4:BPS2:XMPB:23CG
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 15
 Goroutines: 25
 System Time: 2017-09-26T21:53:56.9641908Z
 EventsListeners: 0
Http Proxy: http://docker.for.win.10.0.75.1:3128
Https Proxy: http://docker.for.win.10.0.75.1:3128
No Proxy: 169.254/16, 10/8,127.0.0.1,localhost
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

Here is docker version:

Client:
 Version:      17.06.2-ce
 API version:  1.30
 Go version:   go1.8.3
 Git commit:   cec0b72
 Built:        Tue Sep  5 19:57:19 2017
 OS/Arch:      windows/amd64

Server:
 Version:      17.06.2-ce
 API version:  1.30 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   cec0b72
 Built:        Tue Sep  5 19:59:19 2017
 OS/Arch:      linux/amd64
 Experimental: true
  • host distribution and version (Windows version, build number, etc)
    Windows 10 Enterprise Version 1607 OS Build 14393.1480
    Docker for Windows 17.06.2-ce

Steps to reproduce the behavior

  1. install and properly configure cntlm
  2. install Docker 4 Windows
  3. configure Docker proxy settings to http://docker.for.win.localhost:3128
  4. do docker info observe the proxy settings
  5. do docker login
@djs55
Copy link

djs55 commented Oct 12, 2017

Thanks for your report. On latest stable I see a similar problem -- when I run

docker run -it alpine sh

and then list the environment variables with set I see

http_proxy='http://docker.for.win.10.0.75.1:3128'
...

which is clearly wrong. I tried a few other combinations and it seems that something in the UI is replacing the string localhost with 10.0.75.1 (e.g. docker.uses.localhost.for.things:3128 becomes docker.uses.10.0.75.1.for.things:3128

@djs55
Copy link

djs55 commented Oct 12, 2017

As a workaround, you could set your proxy setting to http://localhost:3128 which will be rewritten to http://10.0.75.1:3128. The IP 10.0.75.1 is a private address used by a local Hyper-V network adapter-- it should be safe to configure CNTLM to bind to that.

@gorootde
Copy link

gorootde commented Jan 19, 2018

My CNTLM is bound to 10.0.75.1 and UI proxy config is set to http://localhost:3128 but nevertheless a docker search command results in proxyconnect tcp: dial tcp 10.0.75.1:3128: i/o timeout. Is there any additional thing to do?

BTW: Releasenotes of 17.09.1-ce-win42 say this issue is fixed, I am running 17.06.2-ce and it is not.

@docker-robott
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants