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 :
- requesting `docker.host.internal:3128" (my local proxy)
- requesting "company.com/proxy:1234"
- requesting "github.com".
What command line utility can get this information? or what other approach can I use to debug inaccessible host?
CodePudding user response:
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.
CodePudding user response:
"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.