December 17, 201411 yr Hi, I browsed tirelessly through the forums to try and find a way to link up containers that communicate with each other, but was disappointed to see that the preferred solution was dropping files into directories shared between containers. I wasn't satisfied with this approach and decided to find a way to link the containers so that data can be exchanged between them via network communication, like it should be. So without much further ado, here is a quick overview of how I linked up SickBeard container with NZBGet so that it can pass NZB files to it directly: Forget the silly text, I used localhost instead of docker host's hostname, but here's a guide to linking containers either way Step 1 - Add instruction to link SickBeard to NZBget in the unRAID webGUI The command is --link <container name to link with>:<alias> Remember the alias because you will need it for... Step 2 - Refer to the NZBGet container in SickBeard When you perform the linking, docker will create some environment variables that specify which IP address was linked under, and what ports are available. In addition to this, it will also create a hostname in the container you created the link from, that maps alias from the --link command to the internal IP given to the container you linked to. This is probably best seen rather than explained: root@Tower:/mnt# docker exec -i -t e0c4109fc635 bash root@e0c4109fc635:/# cat /etc/hosts 172.17.0.25 e0c4109fc635 ff02::2 ip6-allrouters 127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes 172.17.0.11 nzbget Note the last line! We can now use this to refer to the target container directly, like so: And voila! You're done. It would be nice if there was some sort of a "helper" page in the webGUI to achieve this, but this approach isn't too bad.
December 17, 201411 yr Hi, I browsed tirelessly through the forums to try and find a way to link up containers that communicate with each other, but was disappointed to see that the preferred solution was dropping files into directories shared between containers. I wasn't satisfied with this approach and decided to find a way to link the containers so that data can be exchanged between them via network communication, like it should be. So without much further ado, here is a quick overview of how I linked up SickBeard container with NZBGet so that it can pass NZB files to it directly: Step 1 - Add instruction to link SickBeard to NZBget in the unRAID webGUI The command is --link <container name to link with>:<alias> Remember the alias because you will need it for... Step 2 - Refer to the NZBGet container in SickBeard When you perform the linking, docker will create some environment variables that specify which IP address was linked under, and what ports are available. In addition to this, it will also create a hostname in the container you created the link from, that maps alias from the --link command to the internal IP given to the container you linked to. This is probably best seen rather than explained: root@Tower:/mnt# docker exec -i -t e0c4109fc635 bash root@e0c4109fc635:/# cat /etc/hosts 172.17.0.25 e0c4109fc635 ff02::2 ip6-allrouters 127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes 172.17.0.11 nzbget Note the last line! We can now use this to refer to the target container directly, like so: And voila! You're done. It would be nice if there was some sort of a "helper" page in the webGUI to achieve this, but this approach isn't too bad. This is really neat and I didnt' know you could do that... curious what is the benefit of doing this over IPADDRESSOFUNRAID:6789 in the NZBGET URL
December 17, 201411 yr Author Funny thing, I was unable to get connectivity with the unRAID host ports from the sickbeard docker container, but now I went back and tried it again just to double check... and what do you know... I can reach NZBGet through the host port without any linking EDIT: I used localhost instead of tower as the hostname from SickBeard. Yep, I'm an idiot. Ah well, in case you'll want to link up containers directly for some OTHER reason than stupidity, now you know how.
December 17, 201411 yr Funny thing, I was unable to get connectivity with the unRAID host ports from the sickbeard docker container, but now I went back and tried it again just to double check... and what do you know... I can reach NZBGet through the host port without any linking EDIT: I used localhost instead of tower as the hostname from SickBeard. Yep, I'm an idiot. Ah well, in case you'll want to link up containers directly for some OTHER reason than stupidity, now you know how. I'm glad you found out how to do it
June 1, 20179 yr Maybe this is a dumb question but..... Can you link two containers? I have linked Sonarr and NZBGet and it works fine - score! I also use "Hydra" and would like to link Sonarr and Hydra (at least I think this would be nice?) I tried both "--link hydra:hydra --link NZBGet:nzbget" and "--link NZBGet:nzbget hydra:hydra " but neither seems to work? And perhaps you are only meant to link one container to one container? Thanks!
June 6, 20197 yr Not sure if this is still something that you need. I just found (Unraid 6.6.7) that if you select the 'advanced view' (change the toggle that normally says 'basic view' on the top right); you then have the option of 'Extra Parameters. This is where I was able to add the --link <container-name>.
Archived
This topic is now archived and is closed to further replies.