ContainerNetwork-AutoFix

ContainerNetwork-AutoFix

Docker 应用程序 from buxxdev's Repository

概述

ContainerNetwork AutoFix (CNAF) - Automatically recreates Docker containers that depend on a master container's network when the master container restarts. Perfect for containers routing through VPN containers like GluetunVPN.

When a master container (e.g., VPN) restarts and gets a new container ID, dependent containers using --net=container: lose network connectivity. CNAF automatically detects and recreates those dependent containers.

Features:

  • Auto-detects dependent containers
  • Preserves container states (running/stopped)
  • Smart waiting for VPN establishment
  • Automatic log rotation
  • Zero manual configuration needed

运行时参数

网络
bridge
外壳
sh
特权
false
额外参数
--restart=unless-stopped -v /var/run/docker.sock:/var/run/docker.sock -v /boot/config/plugins/dockerMan/templates-user:/templates:ro

模板配置

AppDataPathrw

Optional: Persistent storage for logs

目标
/var/log
默认值
/mnt/user/appdata/containernetwork-autofix
价值
/mnt/user/appdata/containernetwork-autofix
Master Container NameVariable

Select your VPN/master container from the dropdown. For custom container names, click EDIT and enter the name in the Value field.

目标
MASTER_CONTAINER
默认值
GluetunVPN|OpenVPN-Client|WireGuard|NordVPN|binhex-delugevpn|binhex-qbittorrentvpn
Restart Wait TimeVariable

Seconds to wait after master container restarts before recreating dependents (allows VPN to establish)

目标
RESTART_WAIT_TIME
默认值
15
价值
15
Max Log LinesVariable

Maximum number of log lines to keep (automatic rotation)

目标
MAX_LOG_LINES
默认值
1000
价值
1000
Max RetriesVariable

Number of times to retry finding master container on startup

目标
MAX_RETRIES
默认值
10
价值
10
Retry DelayVariable

Seconds between retry attempts when finding master container

目标
RETRY_DELAY
默认值
10
价值
10

下载统计数据

1,234
下载总数

详细信息

存储库
buxxdev/containernetwork-autofix:latest
最后更新2025-10-17
初见2025-11-04

在Unraid 上运行 ContainerNetwork-AutoFix 。

ContainerNetwork-AutoFix 已被列入Unraid OS 的社区应用程序。探索Unraid ,构建灵活的家庭服务器、NAS 或家庭实验室。