burkasaurusrex Posted December 17, 2019 Share Posted December 17, 2019 Docker has some functionality where multiple containers can share the same network namespace by using --network='container:<name|id>'. Here's the relevant documentation from the docker run network settings docs: --network="bridge" : Connect a container to a network 'bridge': create a network stack on the default Docker bridge 'none': no networking 'container:<name|id>': reuse another container's network stack 'host': use the Docker host network stack '<network-name>|<network-id>': connect to a user-defined network I implemented this without a problem in prior versions of Unraid by setting the Docker "Network Type" in the Unraid template to "None", then setting the "Extra Parameters" to "--network='container:NAME'". This would yield a docker run command that had both the "--network='none'" and "--network='container:NAME'" parameters. This worked great until I updated to Unraid 6.8. It looks the new version of docker no longer allows you to overload the "--network='none'" parameter with the "--network='container:NAME'" parameter and throws this error: /usr/bin/docker: Error response from daemon: Container cannot be connected to network endpoints: container:NAME, none. See '/usr/bin/docker run --help'. So, I've got two questions to try and sort this out: Is there a way in the Unraid template to not send a "--network" parameter? If so, I could just take care of that in the "Extra Parameters". If not, it would be great to add the functionality. Is there a way in the Unraid template to set the network to "container:NAME"? I tried to edit the underlying XML, but it doesn't look like the templating engine is picking up changes. If this is not an option, it would be great to add the functionality I appreciate any help. Thanks! Quote Link to comment
jedduff Posted December 18, 2019 Share Posted December 18, 2019 Had the same issue, I rollback to 6.7.2. We should have the possibility to edit the network field manually in advanced mode instead of putting net:container in extra parameters Quote Link to comment
jedduff Posted December 18, 2019 Share Posted December 18, 2019 13 hours ago, burkasaurusrex said: Docker has some functionality where multiple containers can share the same network namespace by using --network='container:<name|id>'. Here's the relevant documentation from the docker run network settings docs: --network="bridge" : Connect a container to a network 'bridge': create a network stack on the default Docker bridge 'none': no networking 'container:<name|id>': reuse another container's network stack 'host': use the Docker host network stack '<network-name>|<network-id>': connect to a user-defined network I implemented this without a problem in prior versions of Unraid by setting the Docker "Network Type" in the Unraid template to "None", then setting the "Extra Parameters" to "--network='container:NAME'". This would yield a docker run command that had both the "--network='none'" and "--network='container:NAME'" parameters. This worked great until I updated to Unraid 6.8. It looks the new version of docker no longer allows you to overload the "--network='none'" parameter with the "--network='container:NAME'" parameter and throws this error: /usr/bin/docker: Error response from daemon: Container cannot be connected to network endpoints: container:NAME, none. See '/usr/bin/docker run --help'. So, I've got two questions to try and sort this out: Is there a way in the Unraid template to not send a "--network" parameter? If so, I could just take care of that in the "Extra Parameters". If not, it would be great to add the functionality. Is there a way in the Unraid template to set the network to "container:NAME"? I tried to edit the underlying XML, but it doesn't look like the templating engine is picking up changes. If this is not an option, it would be great to add the functionality I appreciate any help. Thanks! Someone on reddit told me to create a network with the name of your container, look at this : https://www.reddit.com/r/unRAID/comments/ebgt06/have_you_guys_noticed_any_quirks_or_bugs_in_68/fb9fr1t/?st=k4bal2a9&sh=3b483579 1 Quote Link to comment
burkasaurusrex Posted December 18, 2019 Author Share Posted December 18, 2019 7 hours ago, jedduff said: Someone on reddit told me to create a network with the name of your container, look at this : https://www.reddit.com/r/unRAID/comments/ebgt06/have_you_guys_noticed_any_quirks_or_bugs_in_68/fb9fr1t/?st=k4bal2a9&sh=3b483579 Awesome - this worked perfectly for me. Thanks @jedduff! For posterity, open terminal and run: docker network create container:NAME Then change "Network" to "CUSTOM:conatiner:NAME" in all of the Unraid Docker templates. Probably worth changing the Unraid setting to preserve customer network names as well. Quote Link to comment
Recommended Posts
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.