docker - 连接到 NordVPN Docker 容器时在 Docker 容器中挂载 NFS 卷
问题描述
我目前正在尝试弄清楚如何正确地将我的 NFS 共享挂载到我的 Docker 容器:radar、sonarr、sabnzbd和jdownloader。容器通过 vpn 服务容器“nordvpn”路由所有流量。
当我试图打开 NFS 文件夹时,它们只是空的。所以我猜这个坐骑不能正常工作。
我还尝试仅将没有 nordvpn 容器的 sabnzbd 服务连接到 NFS 共享。这对我也不起作用。
我的撰写文件:
version: "3"
services:
vpn:
image: bubuntux/nordvpn:3.7.4 # olderversion caused by a connection error
container_name: nordvpn
network_mode: bridge # Required
cap_add:
- NET_ADMIN # Required
- SYS_MODULE # Required for TECHNOLOGY=NordLynx
sysctls:
- net.ipv4.conf.all.rp_filter=2
devices:
- /dev/net/tun # Required
environment: # Review https://github.com/bubuntux/nordvpn#environment-variables
- USER=xxx # Required
- "PASS=xxx" # Required
- CONNECT=Netherlands
- TECHNOLOGY=NordLynx
- NETWORK=192.168.2.0/24
- TZ=Europe/Berlin
ports:
- 8080:8080 # sabnzbd
- 7878:7878 # radarr
- 8989:8989 # sonarr
- 5800:5800 # jdownloader
sabnzbd:
image: linuxserver/sabnzbd
container_name: sabnzbd
network_mode: service:vpn
depends_on:
- vpn
volumes:
# - "./config/sabnzbd:/config" # sab config directory
- "/192.168.2.222/mnt/array1/Share/Complete_Down:/complete_downloads" # completed directory for downloads. this contains the category directories
- "/192.168.2.222/mnt/array1/Share/Temp_Down:/temp_downloads" # "temp" directory for downloads
- "/192.168.2.222/mnt/array1/Share:/storage/Share"
- "/192.168.2.222/mnt/array1/xxx:/storage/Filme"
- "/192.168.2.222/mnt/array1/xxx:/storage/Serien"
- "/192.168.2.222/mnt/array1/xxx:/storage/Spiele"
environment:
TZ: Europe/Berlin
PUID: 99 # set to UID of your user
PGID: 99 # set to GID of your user
radarr:
image: linuxserver/radarr
container_name: radarr
network_mode: service:vpn
depends_on:
- vpn
volumes:
# - "./config/radarr:/config" # config directory for radarr
- "/192.168.2.222/mnt/array1/Share/Complete_Down:/complete_downloads" # completed downloads directory from sab
- "/192.168.2.222/mnt/array1/xxx/storage/Filme/HD" # where radarr will copy your movies. add as many of these as you need
environment:
TZ: Europe/Berlin
PUID: 99 # set this to the UID of your user
PGID: 99 # set this to the GID of your user
sonarr:
image: linuxserver/sonarr
container_name: sonarr
network_mode: service:vpn
depends_on:
- vpn
volumes:
# - "./config/sonarr:/config" # sonarr config dir
- "/192.168.2.222/mnt/array1/Share/Complete_Down:/complete_downloads" # completed downloads directory
- "/192.168.2.222/mnt/array1/xxx:/storage/Serien"
environment:
TZ: Europe/Berlin
PUID: 99 # set this to the UID of your user
PGID: 99 # set this to the GID of your user
#initialize jdownloader Docker Image
jdownloader-2:
image: jlesage/jdownloader-2
container_name: jdownloader
network_mode: service:vpn
depends_on:
- vpn
volumes:
- "/docker/appdata/jdownloader-2:/config"
- "/192.168.2.222/mnt/array1/Share/Complete_Down:/output"
我也试过这样
volumes:
share:
driver: local
driver_opts:
type: nfs
o: addr=192.168.2.222,rw
device: ":/mnt/array1/Share"
有任何想法吗 ?
解决方案
推荐阅读
- inno-setup - 从 Internet 读取 Inno Setup 加密密钥而不是密码框
- r - fixst::iplot(),删除一些因素
- node.js - npm 包已更新,但仍检测到不推荐使用的包并且 gatsby-cli 不起作用
- javascript - 如何在 Svelte 中获取 div 的偏移宽度?
- php - 为什么“使用”语句在我的 PHP 脚本中不起作用?
- ruby-on-rails - 如何在 Rails 中过滤连接表中的未来记录?
- python - 将 nltk.tree.Tree 的结果保存到 Python 中的列表
- azure - 取消链接 Azure Runbook 所需的权限
- sql - Oracle 19c 数据库从行生成 JSON 而不传递字段名称
- javascript - 如何从使用 fetch api 和 javascript 获取的用户列表中显示模型中的用户配置文件