Skip to content
This repository was archived by the owner on Jan 1, 2021. It is now read-only.

Automatically mount home directory in init script #84

Closed

Description

@bfirsh

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

Activity

  1. aheissenberger commented on Jan 16, 2014

    @aheissenberger
    Contributor

    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

  2. bfirsh commented on Jan 17, 2014

    @bfirsh
    ContributorAuthor

    Virtualbox shared folders are very slow though. I'd much get NFS (or similar) working which doesn't need the Virtualbox guest additions.

  3. aheissenberger commented on Jan 20, 2014

    @aheissenberger
    Contributor

    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

  4. bfirsh commented on Mar 26, 2014

    @bfirsh
    ContributorAuthor

    #284 looks like it might help with this.

  5. lazywei commented on Apr 1, 2014

    @lazywei

    Really need this feature, the shared folder is really important.
    Will this be merged?

  6. steeve commented on Apr 23, 2014

    @steeve
    Contributor

    use #284 for now

  7. SvenDowideit commented on May 30, 2014

    @SvenDowideit
    Contributor

    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.

  8. jmmills commented on May 30, 2014

    @jmmills

    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
    

    Kind of an interesting problem.

  9. jmmills commented on May 30, 2014

    @jmmills

    ^ at least my thinking is that it would keep things orthogonal between docker's run and build verbs when using boot2docker.

  10. steeve commented on Jun 4, 2014

    @steeve
    Contributor

    @jmmills look at #284

  11. jmmills commented on Jul 1, 2014

    @jmmills

    @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.

  12. jmmills commented on Jul 2, 2014

    @jmmills

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions