V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
n2l
V2EX  ›  问与答

docker 中运行 syncthing 问题

  •  
  •   n2l · 217 天前 · 446 次点击
    这是一个创建于 217 天前的主题,其中的信息可能已经有所发展或是发生改变。

    linux 的 docker 中部署好了 syncthing ,多次验证后发现问题如下:

    • 要同步的文件夹如果在外接 usb 设备上,syncthing 就无法扫描进而无法同步
    • 要同步的文件夹如果在本地文件夹(非 usb 设备),可以正常同步
    • 如果直接在宿主机上安装 syncthing ,usb 上的共享文件夹可以同步

    判断问题出现在 docker 对 usb 的访问限制上,但是真正通过 docker exec 进入了 container 中后,又可以看见 upload 文件夹,里面的照片也都能看见,既然能看见,又不能扫描,不知道要怎么搞,求指教,最后附上 compose 文件,usb 设备挂载到/mnt/usb 。

    services:
      syncthing:
        image: lscr.io/linuxserver/syncthing:latest
        container_name: syncthing
        environment:
          - PUID=0
          - PGID=0
          - TZ=Etc/UTC
        volumes:
          - /home/xx/syncthing/config:/config
          - /mnt/usb/mt-photos/upload:/upload
        ports:
          - 8384:8384
          - 22000:22000/tcp
          - 22000:22000/udp
          - 21027:21027/udp
        restart: unless-stopped
    n2l
        1
    n2l  
    OP
       216 天前 via iPhone
    有人知道吗?
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3671 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 00:05 · PVG 08:05 · LAX 17:05 · JFK 20:05
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.