You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 1, 2021. It is now read-only.
Automatically mount home directory in init script #84
Shared folders is one of the things that is stopping me from switching myself and Fig from docker-osx. It's essential for using Docker in development.
The way we have it set up for docker-osx is it mounts your home directory into the same place inside the VM. So, for example, /Users/ben on OS X is mounted at /Users/ben inside the VM. This works brilliantly for Docker volumes, because I can do run like docker run -v .:/code ... and it Just Works because . expands to /Users/ben/....
I see there are plans to get NFS working in #64, but are there plans to do a similar automatic NFS mount for boot2docker? Or a better question perhaps – are there any objections to doing this? Because I'd quite like to do it. ;)
You could look into the option to partial install the vbox guest additions with only sharing activated.
On Thu, Jan 16, 2014 at 8:11 PM, Ben Firshman [email protected]
wrote:
Shared folders is one of the things that is stopping me from switching myself and Fig from docker-osx. It's essential for using Docker in development.
The way we have it set up for docker-osx is it mounts your home directory into the same place inside the VM. So, for example, /Users/ben on OS X is mounted at /Users/ben inside the VM. This works brilliantly for Docker volumes, because I can do run like docker run -v .:/code ... and it Just Works because . expands to /Users/ben/....
I see there are plans to get NFS working in #64, but are there plans to do a similar automatic NFS mount for boot2docker? Or a better question perhaps – are there any objections to doing this? Because I'd quite like to do it. ;)
Reply to this email directly or view it on GitHub: #84
You can try this #87 to activate NFS Server & Client but I have not found a simple solution without modifying the docker code to mount the current home directory
we're making boot2docker as simple and small as possible - so at this point, adding tools that are not relevant to all usecases (bare HW, vbox, vagrant, hyper-v, vmware, kvm, etc) is not on the plan. This may change in future, but we havn't completed our original feature set yet.
It seems like the real underlying issue here (at least in my fiddling with trying to get similar things to work) is that the relative paths are not transparent.
To make it seem (under OSX) like your working with a native docker service it would seem that you would want the workflow to behavior like this:
$ boot2docker up
...
$ cd ~/some/project/dir/
$ docker run -t -i -v $CWD:/some/working/dir $image
I think in my case the biggest help to make a work around is actually an issue with the docker client communicating to boot2docker and the docker service.
If I could just tell docker (or fig) that . needs to be mounted in boot2docker (at runtime?) and used as a volume that would help to make things seamless.
So really something like this would be optimal:
$ boot2docker up
...
$ cd ~/some/project/dir
$ grep WORKDIR Dockerfile
WORKDIR /project
$ cat fig.yml
dev:
build: .
volumes:
- .:/project
command: test
$ fig up
@steeve Sure, but what I'm really saying is that this should be something included in the core feature set. Accessing volume data is a core and heavily used feature in docker, this boot2docker shouldn't hobble the tool it's built to support.
My input was directed at the fact that this needs to be (IMHO) more than a work around.
Activity
aheissenberger commentedon Jan 16, 2014
You could look into the option to partial install the vbox guest additions with only sharing activated.
On Thu, Jan 16, 2014 at 8:11 PM, Ben Firshman [email protected]
wrote:
bfirsh commentedon Jan 17, 2014
Virtualbox shared folders are very slow though. I'd much get NFS (or similar) working which doesn't need the Virtualbox guest additions.
aheissenberger commentedon Jan 20, 2014
You can try this #87 to activate NFS Server & Client but I have not found a simple solution without modifying the docker code to mount the current home directory
bfirsh commentedon Mar 26, 2014
#284 looks like it might help with this.
lazywei commentedon Apr 1, 2014
Really need this feature, the shared folder is really important.
Will this be merged?
steeve commentedon Apr 23, 2014
use #284 for now
SvenDowideit commentedon May 30, 2014
we're making boot2docker as simple and small as possible - so at this point, adding tools that are not relevant to all usecases (bare HW, vbox, vagrant, hyper-v, vmware, kvm, etc) is not on the plan. This may change in future, but we havn't completed our original feature set yet.
jmmills commentedon May 30, 2014
It seems like the real underlying issue here (at least in my fiddling with trying to get similar things to work) is that the relative paths are not transparent.
To make it seem (under OSX) like your working with a native docker service it would seem that you would want the workflow to behavior like this:
I think in my case the biggest help to make a work around is actually an issue with the docker client communicating to boot2docker and the docker service.
If I could just tell docker (or fig) that . needs to be mounted in boot2docker (at runtime?) and used as a volume that would help to make things seamless.
So really something like this would be optimal:
Kind of an interesting problem.
jmmills commentedon May 30, 2014
^ at least my thinking is that it would keep things orthogonal between docker's run and build verbs when using boot2docker.
steeve commentedon Jun 4, 2014
@jmmills look at #284
jmmills commentedon Jul 1, 2014
@steeve Sure, but what I'm really saying is that this should be something included in the core feature set. Accessing volume data is a core and heavily used feature in docker, this boot2docker shouldn't hobble the tool it's built to support.
My input was directed at the fact that this needs to be (IMHO) more than a work around.
jmmills commentedon Jul 2, 2014
Actually I'll try my luck writing a patch to allow for post-init hooks, this would be lite and simple but allow people share setup recipes.