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 Oct 21, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 21, 2024. It is now read-only.
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 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.
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.
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. 🙂
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.
changed the title [-]Is there a way to mount additional shared into the boot2docker image?[/-][+]support configuring multiple NFS mounts[/+]on Oct 11, 2016
Activity
codekitchen commentedon Mar 31, 2016
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.ymlfile.Hengjie commentedon Sep 12, 2016
You may be able to work around by setting up symlinks or hard links to the shared guest directory.
mattlubner commentedon Oct 7, 2016
@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_modulesdirectory in addition to the user's home directory.mattlubner commentedon Oct 7, 2016
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 yournode_modulesdirectory), then manually edit the created symbolic links so they're absolute instead of relative. Finally, make sure your actual docker command (ordocker-compose.ymlfile) links$HOME:$HOME, and it should work. Ugly, but at least possible.codekitchen commentedon Oct 10, 2016
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 commentedon Oct 10, 2016
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 linkbreaks when the/usr/local/lib/node_modulesdirectory isn't present within the Docker container.Adding support for mounting multiple directories would solve the underlying issue. 🙂
codekitchen commentedon Oct 10, 2016
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.
[-]Is there a way to mount additional shared into the boot2docker image?[/-][+]support configuring multiple NFS mounts[/+]