IP address broken with --net=host
- Dominant language
- Python
- Stars
- 1
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
```bash
docker run --rm --net=host fnndsc/pfurl --http 127.0.0.1:5010/api/v1/cmd
Traceback (most recent call last):
File "/usr/local/bin/pfurl", line 23, in
str_defIP = [l for l in ([ip for ip in socket.gethostbyname_ex(socket.gethostname())[2] if not ip.startswith("127.")][:1], [[(s.connect(('8.8.8.8', 53)), s.getsockname()[0], s.close()) for s in [socket.socket(socket.AF_INET, socket.SOCK_DGRAM)]][0][1]]) if l][0][0]
socket.gaierror: [Errno -2] Name or service not known
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure with the documented `docker run --rm --net=host fnndsc/pfurl --http 127.0.0.1:5010/api/v1/cmd` command and inspect the `/usr/local/bin/pfurl` entry point, especially the address-detection expression shown in the traceback. Done means the command no longer raises this `socket.gaierror` when run with host networking.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- cli, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100