3

I have been having trouble using docker whenever I am on my campus' wifi. Trying to pull or run an image which needs to be pulled gives me the following error:

Error while pulling image: Get https://index.docker.io/v1/repositories/library/redis/images: dial tcp: lookup index.docker.io on 66.170.14.12:53: server misbehaving

My research has lead me across this post which seems consistent with what I'm experiencing, but the proposed fix has not worked. What can I do to avoid this issue in the future?

Community
  • 1
  • 1
AmenRadix
  • 75
  • 1
  • 7

1 Answers1

1

As I explained in another context (Windows, corporate proxy), you need to set HTTP_PROXY environment variables in your Dockerfile (if your Dockerfile needs to access internet) or in your session environment variables (in a .profile or .bashrc):

export HTTP_PROXY=http://<user>:<pwd>@proxy.company:80
export HTTPS_PROXY=http://<user>:<pwd>@proxy.company:80
export NO_PROXY=.company,.sock,localhost,127.0.0.1,::1,192.168.59.103

Note that with docker 1.9, you will be able to leave those outside Dockerfile with build-timeargument passing (merge in PR 15182).

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250