V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
n2l
V2EX  ›  问与答

docker 中运行 syncthing 问题

  •  
  •   n2l · Feb 23, 2025 · 651 views
    This topic created in 437 days ago, the information mentioned may be changed or developed.

    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
       Feb 24, 2025 via iPhone
    有人知道吗?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5427 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 57ms · UTC 09:35 · PVG 17:35 · LAX 02:35 · JFK 05:35
    ♥ Do have faith in what you're doing.