I am trying to mount a FUSE virtual filesystem from inside a Docker container and expose the mount point to the host.
Docker is installed via snap on Ubuntu 20.04
The software is a fresh install of [Seafile][1] (a Dropbox alternative), but this problem I believe is more related to Docker, snap, and mounting file systems on Ubuntu. For what it’s worth, I was following the official instructions [here][2].
Inside the container (when it runs successfully), a script mounts a FUSE virtual filesystem to /seafile-fuse
that makes the all files stored within Seafile visible.
docker-compose.yml exerpt:
version: '3.3'
services:
seafile:
image: seafileltd/seafile-mc:latest
container_name: seafile
volumes:
- /home/jonathan/seafile/seafile-data:/shared
- type: bind
source: /home/jonathan/seafile/seafile-fuse
target: /seafile-fuse
bind:
propagation: rshared
privileged: true
cap_add:
- SYS_ADMIN
This leads to:
ERROR: for seafile Cannot start service seafile: path /home/jonathan/seafile/seafile-fuse is mounted on /home but it is not a shared mount
I found this question on StackOverflow which hints that the issue may to do with the docker daemon running in a different namespace.
What do I need to do to connect the host directory /home/jonathan/seafile/seafile-fuse
so that it sees the container directory /seafile-fuse
?
Bonus question…
Given that this is to be an internet facing home-server, is it necessary this this becomes a privileged container? Are there better options?
Thanks!!
I have described the situation on the Seafile forums Official Instructions for FUSE Extension in Docker leads to errors - Seafile Server - Seafile Community Forum