I'm running a web service on http://localhost:8000
, where I want to connect from a docker container. So basically inside the docker container I've tried
requests.get("http//:localhost:8000)
requests.get("http//:host.docker.internal:8000)
requests.get("http//:0.0.0.0:8000)
but all these give an
equivalent error: **requests.exceptions.ConnectionError:
HTTPConnectionPool(host='host.docker.internal', port=8000): Max
retries exceeded with url: / (Caused by
NewConnectionError('<urllib3.connection.HTTPConnection object at
0x7f95892fdbb0>: Failed to establish a new connection: [Errno -2]
Name or service not known'))**