Skip to content

Instantly share code, notes, and snippets.

@jamesmacwhite
Last active January 29, 2020 23:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesmacwhite/4731201599dfb8451b56687425262d6c to your computer and use it in GitHub Desktop.
Save jamesmacwhite/4731201599dfb8451b56687425262d6c to your computer and use it in GitHub Desktop.
Nanobox and manually fixing failed mounting on Windows

Nanobox manual mounting of codebase folder

Sometimes Nanobox will fail to mount the codebase of an app through the usual nanobox run command. This will lead to a constant loop of attempting to mount the codebase folder before Nanobox gives up after a few tries, despite entering the correct password. If you look at the logs, this will often be due to a host is down error.

This can often because the mount has not been correctly set. You can do this manually, by running net share as per:

https://github.com/nanobox-io/nanobox/blob/a512a85c181cab4ca454456a915bee5147796a8b/util/provider/share/share_windows.go#L81

The syntax is:

net share nanobox-[APP-ID]=C:/path/to/project" /unlimited /GRANT:%username%,FULL
  • [APP-ID] - Should be replaced by the nanobox app ID, this can be found by viewing the nanobox.log or using verbose/debug logs
  • C:/path/to/project - Replace with the path to your code folder on your machine
  • %username% - Is the username of the Windows account you are logged in with. You should be able to use this as an environment variable, rather than manually specifying your username.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment