Getting connection refused in docker

I am using ubuntu 16.04. After installing docker, when I run docker pull hello-world, I am getting this error :

Using default tag: latest
Error response from daemon: Get dial tcp 35.169.231.249:443: getsockopt: connection refused

I think the problem may be due to the proxy setting of my connection. I am using college LAN and it uses proxy setting for hostname and port. I am getting problem only here in docker. Rest of the thing is working properly in connectivity. Please help, what to do?

1

1 Answer

I got the solution for this.

1.Create a systemd drop-in directory for the docker service:

$ sudo mkdir -p /etc/systemd/system/docker.service.d

2.Create a file called /etc/systemd/system/docker.service.d/http-proxy.conf that adds the HTTP_PROXY environment variable: (Use sudo touch/nano to create file)

sudo nano filename.txt

[Service]

Environment="HTTP_PROXY="

3.Flush changes:

$ sudo systemctl daemon-reload

4.Restart Docker:

$ sudo systemctl restart docker

5.Verify that the configuration has been loaded:

$ systemctl show --property=Environment docker Environment=HTTP_PROXY=

visit :

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like