我对使用 Docker 和 Docker Compose 还比较陌生,遇到了一个问题,不知道该如何解决。如能得到任何帮助,我将不胜感激!
这是我的设置:
容器 1:主机 NordVPN
容器 2:运行 qBittorrent
我已经配置了 docker-compose 文件,以便容器 2 依赖于容器 1。当我启动容器时,一切似乎都运行正常。但是,当我尝试下载 torrent 时,状态立即被标记为“停滞”。
以下是我目前已确认的情况:
Both containers are getting the same public IP address.
Both containers can communicate with Google (tested with ping/curl).
qBittorrent works fine without going through the VPN.
Other torrent programs such as transmitting and deluge run with no issue.
一旦我通过 VPN 容器路由 qBittorrent,它就会再次停止工作。
有人之前遇到过这个问题吗?或者有人对我可能做错的事情有什么建议吗?
services:
# NordVPN service
nordvpn:
image: ghcr.io/bubuntux/nordlynx
container_name: nordvpn
cap_add:
- NET_ADMIN
environment:
- PRIVATE_KEY= "insert key"
- CONNECT=au
- TECHNOLOGY=NordLynx
- NET_LOCAL=192.168.0.0/24
ports:
- 6881:6881/tcp
- 6881:6881/udp
- 8080:8080/tcp
sysctls:
net.ipv6.conf.all.disable_ipv6: 1
restart: unless-stopped
qbittorrent:
image: lscr.io/linuxserver/qbittorrent:latest
container_name: qbittorrent
environment:
- PUID=1000
- PGID=1000
- TZ='Australia/Brisbane'
- WEBUI_PORT=8080
- TORRENTING_PORT=6881
volumes:
- ./config:/config
- /home/andrew/downloads:/downloads
depends_on:
- nordvpn
network_mode: container:nordvpn # Use the VPN container's network
提前感谢您的帮助!