[PR #2] [MERGED] Proxmox CT mode with dual-NIC LAN bridge and daemon resilience #4

Closed
opened 2026-10-15 12:51:13 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/games-on-whales/LXC2Docker/pull/2
Author: @JBailes
Created: 4/13/2026
Status: ✅ Merged
Merged: 4/14/2026
Merged by: @JBailes

Base: docker-lxc-daemon ← Head: aimee/session/b86598a3


📝 Commits (8)

  • 26a458d Fix Wolf compatibility: CGO deadlocks, Docker state mapping, and missing inspect fields
  • 9f93476 Proxmox CT mode: wolf/wolf-den as PVE CTs, ephemeral on ZFS
  • 1ac053b Fix PVE deploy: hostname sanitization, basevol paths, raw network config
  • 46f8145 Dual-NIC LAN bridge: containers get routable IPs on physical network
  • 86c0fc1 Fix mDNS: make LAN bridge the primary NIC (net.0)
  • 3f864d9 Fix rootfs path for symlink resolution in ephemeral containers
  • 6b4c87d Fix stale Docker socket after daemon restart
  • 99264c0 Fix ephemeral container lifecycle and Docker API compatibility

📊 Changes

9 files changed (+1611 additions, -222 deletions)

View changed files

📝 cmd/docker-lxc-daemon/main.go (+34 -3)
📝 internal/api/containers.go (+114 -21)
📝 internal/api/router.go (+24 -0)
📝 internal/api/system.go (+52 -0)
📝 internal/api/types.go (+54 -41)
📝 internal/lxc/config.go (+525 -26)
📝 internal/lxc/manager.go (+776 -126)
📝 internal/lxc/network.go (+25 -1)
📝 internal/store/store.go (+7 -4)

📄 Description

Summary

  • Proxmox CT mode: Wolf and wolf-den run as full Proxmox CTs (visible in PVE UI) with their own LAN IPs derived from VMID
  • Dual-NIC networking: LAN bridge as net.0 (primary, for mDNS) + internal gow0 as net.1; triggered by gow.lan Docker label
  • Daemon socket resilience: Socket mounts use directory bind-mounts instead of file bind-mounts, surviving daemon restarts without breaking container connectivity
  • Ephemeral rootfs fix: Parse lxc.rootfs.path from config for ZFS clone containers instead of assuming config_dir/rootfs

Changes

  • cmd/docker-lxc-daemon/main.go: LAN bridge flags (--lan-bridge, --lan-prefix, --lan-gateway, --lan-subnet); socket moved to /run/docker-lxc-daemon/ with compat symlink
  • internal/lxc/config.go: Dual-NIC config generation, socket directory mount logic (appendSocketMount), resolveInRootfs helper
  • internal/lxc/network.go: DualNICConfig() — LAN as net.0, internal as net.1
  • internal/lxc/manager.go: LANConfig struct, VMID-based LAN IP computation, socket symlink creation in prepareRootfs
  • internal/api/containers.go: Parse gow.lan label, override host networking for LAN containers

Test plan

  • Wolf (CT 106) runs with dual-NIC: 192.168.1.106 (LAN) + 10.100.0.x (internal)
  • Wolf-den (CT 107) runs with dual-NIC: 192.168.1.107 (LAN) + 10.100.0.x (internal)
  • mDNS advertises LAN IP (verified with Moonlight pairing)
  • Ephemeral containers (PulseAudio, Wolf-UI, Steam) launch on gow0
  • Daemon restart does NOT break Wolf's Docker socket connection
  • docker-compose works through compat symlink at /var/run/docker.sock

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/games-on-whales/LXC2Docker/pull/2 **Author:** [@JBailes](https://github.com/JBailes) **Created:** 4/13/2026 **Status:** ✅ Merged **Merged:** 4/14/2026 **Merged by:** [@JBailes](https://github.com/JBailes) **Base:** `docker-lxc-daemon` ← **Head:** `aimee/session/b86598a3` --- ### 📝 Commits (8) - [`26a458d`](https://github.com/games-on-whales/LXC2Docker/commit/26a458da471147f079d42596b016a48c8d5b12ff) Fix Wolf compatibility: CGO deadlocks, Docker state mapping, and missing inspect fields - [`9f93476`](https://github.com/games-on-whales/LXC2Docker/commit/9f93476eff215dad14b822921accb99a41ce40a7) Proxmox CT mode: wolf/wolf-den as PVE CTs, ephemeral on ZFS - [`1ac053b`](https://github.com/games-on-whales/LXC2Docker/commit/1ac053b6ff8514d259eb6dbb4305d529ca85fbf9) Fix PVE deploy: hostname sanitization, basevol paths, raw network config - [`46f8145`](https://github.com/games-on-whales/LXC2Docker/commit/46f814557a1ef102584117a689c3edfe4659f1a7) Dual-NIC LAN bridge: containers get routable IPs on physical network - [`86c0fc1`](https://github.com/games-on-whales/LXC2Docker/commit/86c0fc1cf2cda8c523a967c2110f544b4a9a62eb) Fix mDNS: make LAN bridge the primary NIC (net.0) - [`3f864d9`](https://github.com/games-on-whales/LXC2Docker/commit/3f864d91d8fc411757464d9ba83f588a2bb9fa63) Fix rootfs path for symlink resolution in ephemeral containers - [`6b4c87d`](https://github.com/games-on-whales/LXC2Docker/commit/6b4c87d546ccb47d4649b333ab7086b00e60f4ab) Fix stale Docker socket after daemon restart - [`99264c0`](https://github.com/games-on-whales/LXC2Docker/commit/99264c07b1f91f29d066ac977a2ccac9114f2703) Fix ephemeral container lifecycle and Docker API compatibility ### 📊 Changes **9 files changed** (+1611 additions, -222 deletions) <details> <summary>View changed files</summary> 📝 `cmd/docker-lxc-daemon/main.go` (+34 -3) 📝 `internal/api/containers.go` (+114 -21) 📝 `internal/api/router.go` (+24 -0) 📝 `internal/api/system.go` (+52 -0) 📝 `internal/api/types.go` (+54 -41) 📝 `internal/lxc/config.go` (+525 -26) 📝 `internal/lxc/manager.go` (+776 -126) 📝 `internal/lxc/network.go` (+25 -1) 📝 `internal/store/store.go` (+7 -4) </details> ### 📄 Description ## Summary - **Proxmox CT mode**: Wolf and wolf-den run as full Proxmox CTs (visible in PVE UI) with their own LAN IPs derived from VMID - **Dual-NIC networking**: LAN bridge as net.0 (primary, for mDNS) + internal gow0 as net.1; triggered by `gow.lan` Docker label - **Daemon socket resilience**: Socket mounts use directory bind-mounts instead of file bind-mounts, surviving daemon restarts without breaking container connectivity - **Ephemeral rootfs fix**: Parse `lxc.rootfs.path` from config for ZFS clone containers instead of assuming `config_dir/rootfs` ## Changes - `cmd/docker-lxc-daemon/main.go`: LAN bridge flags (`--lan-bridge`, `--lan-prefix`, `--lan-gateway`, `--lan-subnet`); socket moved to `/run/docker-lxc-daemon/` with compat symlink - `internal/lxc/config.go`: Dual-NIC config generation, socket directory mount logic (`appendSocketMount`), `resolveInRootfs` helper - `internal/lxc/network.go`: `DualNICConfig()` — LAN as net.0, internal as net.1 - `internal/lxc/manager.go`: `LANConfig` struct, VMID-based LAN IP computation, socket symlink creation in `prepareRootfs` - `internal/api/containers.go`: Parse `gow.lan` label, override host networking for LAN containers ## Test plan - [x] Wolf (CT 106) runs with dual-NIC: 192.168.1.106 (LAN) + 10.100.0.x (internal) - [x] Wolf-den (CT 107) runs with dual-NIC: 192.168.1.107 (LAN) + 10.100.0.x (internal) - [x] mDNS advertises LAN IP (verified with Moonlight pairing) - [x] Ephemeral containers (PulseAudio, Wolf-UI, Steam) launch on gow0 - [x] Daemon restart does NOT break Wolf's Docker socket connection - [x] docker-compose works through compat symlink at /var/run/docker.sock --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 12:51:13 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
games-on-whales/LXC2Docker#4
No description provided.