elmerfds / rebuild-dndc

Re-create containers that use another container's network stack (i.e. routing container traffic through a VPN container)
GNU General Public License v3.0
22 stars 9 forks source link

Restarting by rebuild-dndc leads to orphaned containers #69

Open vvmichielvv opened 3 months ago

vvmichielvv commented 3 months ago

Hi!

I have installed rebuild-dndc through community apps in UnRaid and follow the instructions. Once my GlueTun VPN is rebuild/restarted, this indeed triggers the script to take action on the containers that have their network configured to use the VPN.

However, I end up with all orphaned dockers and have to reinstall them. Something is going wrong. Is here any debug log or so as a startpoint? Using Unraid 6.12.10

vvmichielvv commented 3 months ago

I figured this one out myself. The default template for each container using the vpn network contains one or more port item(s), ie WebUI. Because the networkinterface in my setup is set to 'none' and setting the network interface through the extra parameters, this conflicts when starting the container (UnRaid seems to detect that and does not add the -p parameters when starting the container).

The solution was to remove all "port" items from the containers that use the VPN network. Then Rebuild-dndc can rebuild and restart them without a problem. It now works like a charm!

small note: i do see that when restarting a container from the CLI in the Rebuild-dndc container, the -l parameters (labels) are missing. Strangely enough, these labels ARE still there after a Rebuild-dndc rebuild and restart...