如何让 Docker 为 qBittorrent 分配独立的 IP 地址和网关

2019-12-09 23:03:53 +08:00
 tyhunter
家里用 N1 ( 192.168.123.115 )做了旁路由网关手动设置给部分设备 FQ,Docker 运行在群晖( 192.168.123.114 )上,群晖的网关设置为 N1 IP,现在想跑 qbittorrent 下载 PT,由于不想 PT 流量走小飞机,想给 Docker 上运行的 qbittorrent 分配独立的 IP 地址和默认网关(192.168.123.1,DHCP 下的默认网关),尝试配置了下 compose 文件,但一直提示:

root@DSM:/volume1/docker# docker-compose -f /volume1/docker/qbittorrent.yml up -d
Starting qbittorrent-compose ... error

ERROR: for qbittorrent-compose user specified IP address is supported only when connecting to networks with user configured subnets

ERROR: for qbittorrent user specified IP address is supported only when connecting to networks with user configured subnets
ERROR: Encountered errors while bringing up the project.

由于不太懂 Docker,还请大佬指教下是哪里出错了

附上 docker-compose 文件内容:
version: "3"
services:
qbittorrent:
image: linuxserver/qbittorrent
container_name: qbittorrent-compose
environment:
- PUID=1000
- PGID=1000
- TZ=Asia/Shanghai
- UMASK_SET=022
- WEBUI_PORT=8080
volumes:
- /volume1/docker/qbittorrent/config:/config
- /volume3/Media/download:/downloads
ports:
- 6881:6881
- 6881:6881/udp
- 8080:8080
networks:
bridge:
ipv4_address: 192.168.123.68
networks:
bridge:
external:
name: qbittorrent
2478 次点击
所在节点    问与答
1 条回复
ywjdlq
2019-12-10 08:49:49 +08:00
macvlan

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/627440

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX