Wednesday, July 27, 2022

[SOLVED] How to debug network host access

Issue

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?


Solution

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.



Answered By - ikamen
Answer Checked By - Dawn Plyler (WPSolving Volunteer)