Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Not able to resolve container host name #30

Open
myatmin opened this issue Apr 26, 2022 · 1 comment
Open

Not able to resolve container host name #30

myatmin opened this issue Apr 26, 2022 · 1 comment

Comments

@myatmin
Copy link

myatmin commented Apr 26, 2022

Is it possible to resolve container host name?

services:
   proxy-socks5:
    container_name: proxy-socks5
    image: serjs/go-socks5-proxy:latest
    ports:
      - 1080:1080
  db:
    container_name: db-something
    image: ...

Able to curl --socks5 127.0.0.1:1080 <container ip and port>
Not able to curl --socks5 127.0.0.1:1080 <container host name and port>

Environment:
Docker version 20.10.14 on Windows with WSL2 enabled

@serjs
Copy link
Owner

serjs commented Nov 8, 2022

Need more info.
As far as I understand, you try to curl from proxy-socks5 container another container ip and port with success.
If you have errors in name resolving to another container hostname from proxy-socks5 container, then check your docker network setup, you must be in the same docker network for source/target containers.

BTW, socks5-server use system DNS settings, make sure that host resolved from container itself.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants