Is it supports the docker?
Closed this issue · 3 comments
Tried it in the Docker container, as below:
# /root/go/bin/gobazel -debug -daemon=false
/bin/fusermount: fuse device not found, try 'modprobe fuse' first
Mount fail: fusermount exited with code 256
# modprobe fuse
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.9.93-linuxkit-aufs/modules.dep.bin'
modprobe: FATAL: Module fuse not found in directory /lib/modules/4.9.93-linuxkit-aufs
Tried it in the Docker container with --privileged=true
option, as below:
# /root/go/bin/gobazel -debug -daemon=false
/bin/fusermount: mountpoint is not empty
/bin/fusermount: if you are sure this is safe, use the 'nonempty' mount option
Mount fail: fusermount exited with code 256
Notes: I found to calling fusermount
in this line.
Line 353 in d77571a
# /usr/lib/go-1.8/bin/go env GOPATH
/root/go
# ls -al /root/go/src
total 16
drwxr-xr-x 4 root root 4096 Aug 11 03:30 .
drwxr-xr-x 5 root root 4096 Aug 11 03:30 ..
drwxr-xr-x 5 root root 4096 Aug 11 03:30 github.com
drwxr-xr-x 3 root root 4096 Aug 11 03:30 golang.org
I found this link: https://stackoverflow.com/questions/48407184/gcsfuse-on-datalab-vm-machine-error-fusermount-fuse-device-not-found-try-mo
For any FUSE file system to work in a Docker container, you'll need to run the container in privileged mode. If you don't want to do this, at least you'll need these flags set when starting the container:
--security-opt apparmor:unconfined --cap-add mknod --cap-add sys_admin --device=/dev/<fuse_device> -v /mnt/<mnt_point>:/mnt/<mnt_point>:shared
Where fuse_device is the name of the FUSE drive you're using (for example gcsfuse), and mnt_point is the path you're mounting it at.Keep in mind that Datalab doesn't run in privileged more or use these flags by default, so if you're running Datalab using the CLI tool (datalab create command), this won't work.
Hope this can help.
Thank you for your help!
I removed items in $GOPATH/src
, then works well.
Glad to know. Closing the issue now.