Open yannickwurm opened 9 years ago
/Volumes
is never mounted. Nor /Volumes/Macintosh HD
. If you have anything else in /Volumes
, it should be mounted under /Volumes
in the container.
I think /Volumes/Macintosh HD should be mounted - and non-conflicting root links to /Applications /Library etc should be added/included
On 12 Jan 2015, at 14:31, Anurag Priyam notifications@github.com wrote:
/Volumes is never mounted. Nor /Volumes/Macintosh HD. If you have anything else in /Volumes, it should be mounted under /Volumes in the container.
— Reply to this email directly or view it on GitHub.
(my container didn't contain /Volumes
)
Why would you want access to /Applications
or /Library
in the container? I will have to check if root owned files / dirs can be mounted rw
within container.
Did you have anything in /Volume
(on host)?
only Macintosh HD
. I don't think /Applications
or /Library
need to be mounted with w
. r
is enough - to be able to read files that can be in strange places (e.g. from MacTex install?) ...
I made the necessary changes in switch, but still unable to mount /Applications
. Probably because boot2docker is getting in the way. Perhaps @bmpvieira can help.
The underlying issue is that any directory that exists in /
on host that does not conflict with a directory in client should be mounted in / on the client. (e.g. on our cluster such key directories include /data/
, /scratch/
and /gpfs
)
Test case is simple: docker run -it -v /Applications:/Applications
. /Applications
in the container comes up empty.
It is indeed boot2docker
getting in the way. On Mac, boot2docker
is the real host, not OSX.
The workaround is as below, using /Applications
dir as an example:
boot2docker down
VBoxManage sharedfolder remove boot2docker-vm --name Applications
VBoxManage sharedfolder add boot2docker-vm --name Applications --hostpath /Applications
boot2docker up
boot2docker ssh "sudo mkdir -p /Applications && sudo mount -t vboxsf -o uid=1000,gid=50 Applications /Applications"
Mounting /Applications
in a docker container works now: docker run --rm -it -v /Applications:/Applications ubuntu:14.04 ls /Applications
.
And so does switch: switch ubuntu:14.04 ls /Applications
.
I'm not sure how to best incorporate the solution in switch. I will document this in the readme for now. Would be great if boot2docker dealt with this auto-magically.
I think it is safe to suppose that boot2docker will solve this in the future.
Does Docker's "machine" solves this? Should we switch from boot2docker to "machine" in the short term?
docker-machine doesn't seem to solve this. Not automagically.
(actually the directory doesn't even exist) on my mac - not visible in /mnt either.