Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/Volumes isn't mounted #4

Open
yannickwurm opened this issue Jan 12, 2015 · 12 comments
Open

/Volumes isn't mounted #4

yannickwurm opened this issue Jan 12, 2015 · 12 comments

Comments

@yannickwurm
Copy link
Member

(actually the directory doesn't even exist)
on my mac - not visible in /mnt either.

@yeban
Copy link
Contributor

yeban commented Jan 12, 2015

/Volumes is never mounted. Nor /Volumes/Macintosh HD. If you have anything else in /Volumes, it should be mounted under /Volumes in the container.

@yannickwurm
Copy link
Member Author

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 [email protected] 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.

@yannickwurm
Copy link
Member Author

(my container didn't contain /Volumes)

@yeban
Copy link
Contributor

yeban commented Jan 12, 2015

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)?

@yannickwurm
Copy link
Member Author

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?) ...

@yeban
Copy link
Contributor

yeban commented Jan 13, 2015

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.

@yannickwurm
Copy link
Member Author

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)

@yeban
Copy link
Contributor

yeban commented Jan 13, 2015

Test case is simple: docker run -it -v /Applications:/Applications. /Applications in the container comes up empty.

yeban added a commit that referenced this issue Jan 13, 2015
…tainer.

Ideally, this would mount /Applications as well but it's turning up empty in
the container. Perhaps boot2docker is getting in the way?

Also, looks like external drives are mounted in the container as read only.

see #4

Signed-off-by: Anurag Priyam <[email protected]>
@yeban
Copy link
Contributor

yeban commented Feb 17, 2015

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.

@yannickwurm
Copy link
Member Author

yannickwurm commented Feb 17, 2015 via email

@bmpvieira
Copy link
Member

Does Docker's "machine" solves this? Should we switch from boot2docker to "machine" in the short term?

@yeban
Copy link
Contributor

yeban commented Nov 9, 2015

docker-machine doesn't seem to solve this. Not automagically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants