September 29, 2025Sep 29 Hello all,I have multiple custom networks and would like to attach some containers to two Docker networks.I can add a second network to a container with docker network connect <network> <container>, and that works fine, but it isn’t persistent. After restarting the container, the second network is lost.I tried adding --network=<custom_net> under "Extra Parameters" in the container configuration, but it failed. Does anyone have a solution how I could solve this? Thank you very much.
September 30, 2025Sep 30 Author Thanks for the link, that helped. I actually tried with the ‘post argument’ as well, but I forgot to put the ‘&&’ operator at the beginning of the line, so it didn’t work.”&& docker network connect NETWORKNAME CONTAINERNAME
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.