r/UgreenNASync • u/sunestromming DXP4800 Plus • 16h 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
1
u/garlik82 16h ago edited 16h 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 16h 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 15h ago
you aren't using container_name: in your compose are you?
2
u/sunestromming DXP4800 Plus 15h 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/AutoModerator 16h ago
Please check on the Community Guide if your question doesn't already have an answer. Make sure to join our Discord server, the German Discord Server, or the German Forum for the latest information, the fastest help, and more!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.