Docker Community Forums

Share and learn in the Docker community.

Docker Terminal connection refused

(Scyla) #1


I’m fairly new to docker so I might not understand the issue completely. Since this is a network related question and I’m not a network guy I might also get things mixed up and don’t use the correct terminology.

Now, my task is to create a Docker image from a Tomcat web app that I’ve developed. I’ve set up Docker on my Windows 7 machine and I think I got it almost working. After several configuration attempts I managed to get a connection to the docker repository. To get that working I had add the proxy server which I extracted from the PAC file (more on that later) to the config.json file (see screen shot 1).

My understanding is that for creating an image from my web app I need to use the Docker terminal to access the default VM hosts file system to get the packaged war file and the Dockerfile to create an image. For that the terminal sends an HTTP Post request to the Docker default VM that then creates the Docker image.

Here is where I get an error message. Apparently when firing the HTTP request to the IP of the default VM ( the Docker terminal sends it in a way that routes the request over the corporate proxy resulting in an error (see screen shot 2):

I thought I would have this issue covered since I added the default VMs IP address to the NP_PROXY variable in the config.json file. This doesn’t seem to have the desired effect. If I use curl to do an HTTP Get to the default VM I get the same connection error that I get when I browse the Internet and encounter a site that is blocked by the firewall.

As a related note, I also have the HTTP_PROXY, HTTPS_PROXY and NO_PROXY environment variables set directly in Windows.

I’ve talked to one of our network guys who told me that the NO_PROXY variable has no influence on the HTTP requests because the corporate network uses a PAC file for the proxy configuration. Apparently the Docker terminal uses the proxy configuration from the PAC file to route its requests thus the NO_PROXY settings have not effect on the requests.

His advise would be to find a way to start the Docker terminal without the proxy configuration. I’ve looked at the script that is responsible for starting the Docker terminal and tried to determine how to achieve this but had no success.

Has anyone encountered this situation before and knows hot to resolve the issue?

Any help is appreciated.

(Scyla) #2

After tinkering around with some settings I found a workaround for this problem that might be helpful to other.

Apparently the Docker quickstart terminal ignores the NO_PROXY environment variable. As soon as I removed the HTTP_PROXY and HTTPS_PROXY environment variables the terminal worked as expected.

I’m not sure if something is wrong with my NO_PROXY environemnt variable (to me everything looks correct) or if this is a bug in the Docker quickstart terminal.

If someone could confirm this maybe it would make sense to file this as a bug.