Closed meng-tian closed 7 years ago
As mentioned in the README.md, you can find examples in the example directory, it is impossible to guess your Mac's setup so there is no way to provide "working examples". The above output specifies a directory named "/Users/root", unless you made a user named "root" on you Mac which would most likely leave your Mac in a non-working state since it would conflict with the actual UID 0 user.
If you need further help, please provide the following:
I finally got d4m-nfs.sh
successfully ran. But I couldn't mount /mnt/ when run docker container. I have a myproject
directory in /Users/foobar
, and I ran
docker run -v /mnt/myproject:/var/www/html php:7.0.6-apache
And got this:
docker: Error response from daemon: Mounts denied: e info.
.
path /mnt/myproject
is not shared from OS X and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for mor.
Here are the list of things you need:
/Volumes
and /private
and I've removed /Users
.
ln -ns /tmp/d4m-apk-cache /etc/apk/cache
apk update
apk add nfs-utils sntpc
rpcbind -s
DEFGW=$(ip route|awk '/default/{print $3}') FSTAB="\n\n# d4m-nfs mounts\n"
if ! $(grep ':/mnt' /tmp/d4m-nfs-mounts.txt > /dev/null 2>&1); then mkdir -p /mnt FSTAB="${FSTAB}${DEFGW}:/Users/foobar /mnt nfs nolock,local_lock=all 0 0" fi
if [ -e /tmp/d4m-nfs-mounts.txt ]; then while read MOUNT; do DSTDIR=$(echo "$MOUNT" | cut -d: -f2) mkdir -p ${DSTDIR} FSTAB="${FSTAB}\n${DEFGW}:$(echo "$MOUNT" | cut -d: -f1) ${DSTDIR} nfs nolock,local_lock=all 0 0" done < /tmp/d4m-nfs-mounts.txt fi
echo -e $FSTAB >> /etc/fstab
sntpc -i 10 ${DEFGW} &
sleep .5 mount -a touch /tmp/d4m-done
4. no such a file
5. here is the content:
"/Users/foobar" -alldirs -mapall=502:20 localhost
I am wondering is there a way of find out what available for my /mnt
?
After I removed /Volumes
and /private
from docker app, and re-ran the d4m-nfs.sh
, it works now.
Should I always remove /Volumes
and /private
?
@meng-tian please carefully read the README.md, many of you issues are covered there. It is addressed there that you need to remove Volumes from the D4M preferences. If you don't have the file "d4m-nfs/etc/d4m-nfs-mounts.txt" then you are not configuring it correctly, please note that I cannot guess where you cloned the repo to. There is not content to "/tmp/d4m-nfs-mounts.txt" because you did not properly configure "d4m-nfs/etc/d4m-nfs-mounts.txt". Unless your user name is "foobar" then you have something funky, if it is not, then please replace "foobar" with the name of your Mac username (not full name).
@if-kenn , I've followed the readme step by step this time and I've now got /tmp/d4m-nfs-mounts.txt
. Is there anyway I can verify it is working?
I can now mount from /mnt, is that a valid test?
Yes, /mnt will only work if it is working. Let me know if it is now working and we can close this issue.
Yes, now I can mount from /mnt for docker containers.
Thank you!
Great to hear!
Meng-tian how did you get your d4m-nfs.sh to finally work I had the same error but I can't get past that step
@TheDagger It's a long time I haven't use this tool. I cannot recall what I have done to make it working. Maybe open an issue ask for help from @if-kenn ?
Can we have a working example please?
I got this error when run
d4m-nfs.sh
: