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 refusedI 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 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 :