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

support configuring multiple NFS mounts #169

Open
roderik opened this issue Mar 30, 2016 · 7 comments
Open

support configuring multiple NFS mounts #169

roderik opened this issue Mar 30, 2016 · 7 comments

Comments

@roderik
Copy link

roderik commented Mar 30, 2016

I would like to have access to an external disk mounted in /Volumes/Development but I can't figure out how to mount in an xhyve docker machine?

@codekitchen
Copy link
Owner

I merged a PR a while back to support changing the share using some env vars (https://github.com/codekitchen/dinghy/blob/master/cli/dinghy/unfs.rb#L50), but there's not currently support for mounting more than one share.

Probably the best way to make this work would be to always mount the home dir, and allow a list of additional mounts to be specified in the ~/.dinghy/preferences.yml file.

@Hengjie
Copy link

Hengjie commented Sep 12, 2016

You may be able to work around by setting up symlinks or hard links to the shared guest directory.

@mattlubner
Copy link

@Hengjie Can you elaborate? I'm not sure how a symbolic link would help, as it would just resolve to a non-accessible directory. Directory hard-links are an abomination reserved for use by Time Machine.

This feature is kind of crucial for working with Node/NPM, as it breaks the ability to globally link (and develop) non-published npm dependencies with consuming projects. 🙁

For my use case, all that's needed is a way to link the /usr/local/lib/node_modules directory in addition to the user's home directory.

@mattlubner
Copy link

Btw, if anyone comes across this and needs am immediate work-around, you can install and use nvm, globally link with that (remember to wipe out your node_modules directory), then manually edit the created symbolic links so they're absolute instead of relative. Finally, make sure your actual docker command (or docker-compose.yml file) links $HOME:$HOME, and it should work. Ugly, but at least possible.

@codekitchen
Copy link
Owner

I don't have a lot of experience with npm, but for unpublished ruby gems we typically pull them in as a git submodule. Is that not an option with npm?

You could also use a hard directory link rather than a symlink, I suppose.

@mattlubner
Copy link

Well, it's not a good option, considering the use case (active development). I wouldn't want to have to commit + push code just to test it, ya know? That's the use case of npm link – it lets you fake-install a working directory as a dependency, and continue on your merry way. Unfortunately, npm link breaks when the /usr/local/lib/node_modules directory isn't present within the Docker container.

Adding support for mounting multiple directories would solve the underlying issue. 🙂

@codekitchen
Copy link
Owner

What I mean is that we typically use a submodule, and do development on the gem directly in the submodule so that we don't need to commit or push to test things. But yes I'm just proposing alternatives, I'd be happy to see somebody implement easy support for multiple mounts.

@codekitchen codekitchen changed the title Is there a way to mount additional shared into the boot2docker image? support configuring multiple NFS mounts Oct 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants