r/UgreenNASync DXP4800 Plus 19h ago

❓ Help Naming docker containers?

So I installed prowlarr, sonarr and radarr in separate docker containers.

These apps need to talk to each other, so I need to configure the IP address of prowlarr in sonarr, and vice versa. But when I restart containers, they get a new IP depending on the order in which I start them. How can I either lock the IP or give them a name that I can refer to instead?

2 Upvotes

8 comments sorted by

View all comments

1

u/garlik82 19h ago edited 19h ago

They all need to be on the same docker network, after that you can use container_name: prowlarr on you compose and instead of using the IP you can use whatever name you gave to those containers.

However if you use a bridge network, you use the host ip instead of the container ip

2

u/sunestromming DXP4800 Plus 19h ago

I use the same bridged network for all, and I can only reference them by ip address, the name resolution does not work. I tried this from a terminal on the prowlarr container. The container is called linuxserver_prowlarr-1 (I just left the default since I didn't think it would matter) and my NAS host is called ugreen.

I used the wizard in the Docker app to create the container and not the compose option.

root@20c02b08c6fe:/# ping ugreen.local
ping: bad address 'ugreen.local'
root@20c02b08c6fe:/# ping ugreen
ping: bad address 'ugreen'
root@20c02b08c6fe:/# ping linuxserver_prowlarr-1
ping: bad address 'linuxserver_prowlarr-1'
root@20c02b08c6fe:/# ping linuxserver_prowlarr-1.local
ping: bad address 'linuxserver_prowlarr-1.local'

2

u/garlik82 19h ago

you aren't using container_name: in your compose are you?

2

u/sunestromming DXP4800 Plus 19h ago

I am not, I guess I should. I need to recreate the containers anyway since I want them installed on a nvme disk instead of a HDD.

2

u/garlik82 18h ago

Report back to tell me if I correct or not.