Repository navigation
feat(docker): attach containers to multiple custom networks (OS-503) - #2687
Conversation
DockerMan templates could only express one <Network>, so a container that needed two custom networks (e.g. a reverse-proxy net + a service net) lost the extra ones on any UI recreate/update. Docker create/run only accepts a single --network, so this adds an <ExtraNetworks> template field (comma separated) that is applied with 'docker network connect' after the container is created, on both the create and update/recreate paths. - postToXML/xmlToVar: persist + parse <ExtraNetworks> - connectExtraNetworks(): idempotent, skips the primary network - AddContainer UI: 'Additional Networks' multi-select of custom networks - backward compatible: empty/absent field = single-network behaviour
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 25 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
🔧 PR Test Plugin AvailableA test plugin has been generated for this PR that includes the modified files. Version: 📥 Installation Instructions:Install via Unraid Web UI:
Alternative: Direct Download
|
Problem
DockerMan templates can only express a single
<Network>. A container that needs two custom networks (e.g. a reverse-proxy network and a service network) has to bedocker network connected by hand, and that extra attachment is lost on any UI recreate/update — the container silently drops back to one network. This bites reverse-proxy sidecars, management tools, and anything bridging two isolated stacks.Approach
docker create/runonly accepts one--network, so extra networks are attached withdocker network connectafter the container is created. A new optional<ExtraNetworks>template field (comma/space separated) drives it.Helpers.phppostToXMLpersists<ExtraNetworks>from the formxmlToVarparses itconnectExtraNetworks()— idempotent, skips the primary network, runs on created and running containersCreateDocker.phpexecCommandgetXmlVal) afterexecCommandBackward compatible: absent/empty field = today's single-network behaviour.
Testing (against live Docker on 7.x)
connectExtraNetworksmoved a real containervanilla-net→appnet vanilla-net; second call idempotent + correctly skipped the primary.xmlToVarpath-parse →ExtraNetworks=[appnet, proxynet];postToXML↔xmlToVarround-trips; update-pathgetXmlValreads it.php -lclean on both files.Follow-ups / review notes
Targeting 7.4.0.
Linear