Comments (10)
running
docker run -v /Users/$(whoami)/asdasdasd:/asdasdasd -it ubuntu:xenial /bin/bash
Fails for me without having /Users in Preferences -> File sharing.
Are you sure this works outside of d4m, on osxfs?
The default nature for docker is to try to create the paths, thus on linux it makes sense that this works as you likely have access to your home dir.
** EDIT **
I see you are using etc/d4m-nfs-mounts.txt thus the reason your screenshot only has /tmp. Please ignore my above comment.
from d4m-nfs.
Please try updating etc/d4m-nfs-mounts.txt to only have the following line
/Users/alan:/mnt:0:0
re-run d4m-nfs.sh
and see if "docker run -v /Users/alan/asdasdasd:/asdasdasd -it ubuntu:xenial /bin/bash" works.
from d4m-nfs.
@if-kyle I have just tried; I experience the very same error.
from d4m-nfs.
but weren't you meaning, by chance:
"docker run -v /mnt/asdasdasd:/asdasdasd -it ubuntu:xenial /bin/bash"
?
Since you're proposing to mount my home in /mnt?
That last command, in fact, succeeds. What does not seem to succeed is something like:
docker run -v /mnt/asd123/asd123:/asdasdasd123 -it ubuntu:xenial /bin/bash
It looks like that via NFS we're just able to create ONE missing directory, not an entire directory tree. Does that make sense to you?
from d4m-nfs.
I'm experiencing the same error as well :)
❯ docker-compose up -d nginx mysql redis
Creating network "laradockmj5_default" with the default driver
Creating laradockmj5_mysql_1
Creating laradockmj5_redis_1
Creating laradockmj5_applications_1
Creating laradockmj5_workspace_1
Creating laradockmj5_php-fpm_1
Creating laradockmj5_nginx_1
ERROR: for nginx Cannot start service nginx: Mounts denied: .com/docker-for-mac/osxfs/#namespaces for more info.
.
j/moubarmij/l5-code/laradock-mj5/logs/nginx
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
ERROR: Encountered errors while bringing up the project.
from d4m-nfs.
@Mahmoudz you might be experiencing the same error as Alan, but you are quite a different setup. Please make sure to read the README, look at the examples and if you still have issues, create a new issue with all the requested information from the README.
from d4m-nfs.
@alanfranz it appears as though you are having the same problem as others, please review this from the README.md:
from d4m-nfs.
Hello @if-kenn , thanks for your suggestion. But it doesn't seem related to my issue. In my Docker fro mac preferences, I still have just /tmp on osxfs. I tried exporting just /Users
(which seems to have no symlinks around) and I still have the same issue as in my first post:
AlanMacbook:d4m-nfs alan$ docker run -v /Users/alan/asdasdasd:/asdasdasd -it ubuntu:xenial /bin/bash
docker: Error response from daemon: Mounts denied:
The path /Users/alan/asdasdasd
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 more info.
Debug log:
AlanMacbook:d4m-nfs alan$ cat etc/d4m-nfs-mounts.txt
# Be sure that any mounts that have been added here
# have been removed from Docker for Mac -> Preferences -> File Sharing
#
# You must supply the Mac source directory and Moby VM destination directory,
# and optionally add on user/group mapping:
#
# https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man5/exports.5.html
#
# <MAC_SRD_DIR>:<MOBY_VM_DST_DIR>[:MAC_UID_MAP][:MAC_GID_MAP]
#
/Users:/Users:0:0
AlanMacbook:d4m-nfs alan$ cat /tmp/d4m-mount-nfs.sh
ln -nsf /tmp/d4m-apk-cache /etc/apk/cache
apk update
apk add nfs-utils sntpc
rpcbind -s > /dev/null 2>&1
DEFGW=$(ip route|awk '/default/{print $3}')
FSTAB="\n\n# d4m-nfs mounts\n"
if false && ! $(grep ':/mnt' /tmp/d4m-nfs-mounts.txt > /dev/null 2>&1); then
mkdir -p /mnt
FSTAB="${FSTAB}${DEFGW}:/Users/root /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
if ! $(grep "d4m-nfs mounts" /etc/fstab > /dev/null 2>&1); then
echo adding d4m nfs config to /etc/fstab:
echo -e $FSTAB | tee /etc/fstab
else
echo d4m nfs mounts already exist in /etc/fstab
fi
sntpc -i 10 ${DEFGW} &
sleep .5
mount -a
touch /tmp/d4m-done
AlanMacbook:d4m-nfs alan$ cat /tmp/d4m-nfs-mounts.txt
/Users:/Users:0:0
AlanMacbook:d4m-nfs alan$ cat /etc/exports
# d4m-nfs exports
"/Users" -alldirs -mapall=0:0 localhost
from d4m-nfs.
I just did a bunch of testing. It looks like this is something out of our control at the d4m-nfs level. Docker looks to see if the volume exists, if it does not and it does exist where Docker for Mac can write to it will throw this error since it is not aware of the existence of the NFS volumes on the Mac provided d4m-nfs. So the error is a bit misleading in this context.
Bottom line is if you are looking to make directories on the fly, you are stuck with using Docker for Mac native.
from d4m-nfs.
OK. Thanks for all your support! I think it's ok, it's just good to know; maybe writing it in the README will help other people as well.
from d4m-nfs.
Related Issues (20)
- Session data file is not created by your uid HOT 4
- Unable to mount home dir to /mnt HOT 12
- Running d4m-nfs.sh gives something wrong with /etc/exports file error. HOT 9
- mount.nfs: requested NFS version or transport protocol is not supported HOT 14
- Error with mounting volumes with docker-compose HOT 6
- Cannot docker-compose up on laradock: Mounts denied HOT 13
- Not allowed to stop the nfsd service on Mac OS 10.12.4 HOT 6
- Cannot start service applications: Mounts denied HOT 13
- Vagrant entries in /etc/exports causes ./d4m-nfs.sh to fail HOT 5
- Mount Denied HOT 17
- Data from MYSQL is removed from /tmp HOT 5
- Files and folders are created in the host machine but is owned by root user HOT 3
- ENH: add `mkrakauer-rio/disable-full-sync-on-flush.sh` to start up process. HOT 5
- d4m doing weird things in my console HOT 4
- cp: /tmp/d4m-apk-cache/*: No such file or directory HOT 7
- Issue with webpack HOT 2
- Migrate from d4m-nfs to native Docker NFS Volumes discussion HOT 65
- Blank space on /etc/d4m-nfs-mounts.txt break script d4m-nfs.sh HOT 2
- Script will fail if my home directory is not standard HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d4m-nfs.