Docker: can't ping through containers


mika91

Recommended Posts

Hi,

 

I can't succed to ping container from another container using its name !


All my containers are in the same 'bridge' network.
When I run 'docker inspect'  command, I see all the containers (sonarr, radarr, bazarr, jellyfin...)
But if I open a console on a container, a 'ping sonarr' returns 'Name does not resolve'

 

The --name argument is set for all containers.

Let's see dns files in a container:

 

/etc/resolv.conf

# Generated DNSv4 entries:
nameserver 192.168.1.11  # pi-hole docker adress
nameserver 1.1.1.1
nameserver 1.0.0.1

/etc/hosts

127.0.0.1       localhost
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
172.17.0.9      7677bf67772b


Any help ?
Thanks

Edited by mika91
Link to comment
3 minutes ago, shaunmccloud said:

Are you using the default bridge network or did you create your own?  For pinging by name to work you need to create your own.

I use the default one.

I'll try with a custom network (strange that it works with default bridge network, using docker-compose on OMW)

 

Thanks

Link to comment

ok, so I created a new 'my-bridge' network as suggested, and put all my containers in.

And now it's working, I can ping containers using their name.

 

I guess there is a good reason to explain why DNS it's not working on default bridge... 
But for anyone dealing with reverse proxy (or any containers interaction such as bazarr with sonarr/radarr), the feature is missing
And because unRAID is docker/VM oriented, maybe a better documentation and/or UI (create network, use a default network with dns feature, ...) would be an improvement.

 

Whatever, the community and forum are very responsive ;)

Thanks
 

 

Edited by mika91
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.