skip to Main Content

I’m having problems with getting proxy setup right in a docker container. I want to download a file from github, but get unable to resolve host address error from wget. Now, how do I debug what goes wrong in accessing the host? I want to see steps like :

  1. requesting `docker.host.internal:3128" (my local proxy)
  2. requesting "company.com/proxy:1234"
  3. requesting "github.com".

What command line utility can get this information? or what other approach can I use to debug inaccessible host?

2

Answers


  1. "unable to resolve host address" points to a problem with DNS resolution. You can try to ping the IP address of github. If you use docker behind a proxy, you need to make some configuration (https://docs.docker.com/network/proxy/). To test connectivity you can use: ping, curl, wget.

    Login or Signup to reply.
  2. I had similar issues and found it helpful to debug by comparing behavior of curl locally and via docker.

    curl google.com
    docker run -it curlimages/curl google.com
    

    If docker network setup is fine, result should be the same.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search