profuse is an OCaml implementation of the FUSE protocol versions 7.8 and 7.23. The 7.8 protocol version is common to UNIX/GNU Linux, FreeBSD, and OS X. Presently, the library only provides the Linux implementation.
You need to add the ocamllabs opam-repository to have all the right dependencies:
opam remote add ocl https://github.com/ocamllabs/opam-repo-dev.git opam install profuse
Use lofs with docker
Warning: This is very experimental.
First, prepare your local filesystem:
mkdir <mnt-dir> # for instance ~/fuse-mnt mkdir <data-dir> # for instance ~/fuse-data
<mnt-dir>/ MUST NOT be a child of
bad things will happen.
<data-dir>/ will contains files mirrored by
<mnt-dir>/, and all reads and writes to the
<mnt-dir>/ files will go
lofs daemon and will be reflected back in
To "connect" the two directories using the
lofs daemon, run:
cd <data-dir> && ./lofs_main.native <mnt-dir>
You can test the result by opening a new terminal and modifying things
<mnt-dir>: you will see the
lofs daemaon spitting out FUSE
We can now start a docker container and mount
<mnt-dir> as data
docker run -it -v <mnt-dir>:/home ubuntu bash
cd /home into the container, you will see the
spitting out FUSE requests.