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

Invalid mount path when connecting docker from windows to linux #509

Closed
rebornix opened this issue May 29, 2019 · 9 comments
Closed

Invalid mount path when connecting docker from windows to linux #509

rebornix opened this issue May 29, 2019 · 9 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers verified Verification succeeded
Milestone

Comments

@rebornix
Copy link
Member

Re #474

C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: invalid mount config for type "bind": invalid mount path: 'c:/Users/penlv/code/vscode-dev-containers' mount path must be absolute.
See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'
@rebornix
Copy link
Member Author

It's actually a duplicate of #489 but I still see this issue with 0.57.0

@chrmarti
Copy link
Contributor

chrmarti commented May 31, 2019

We automatically mount the project folder, but that is not possible when using a Docker daemon running on a different machine / VM. I'm not sure if there is an easy and reliable way to detect this case and not do the mount. (We could just not do it when "docker.host" is set.)

Workaround is to override the default mount with "workspaceMount" (can be empty or a valid value for docker run's --mount option.)

@chrmarti chrmarti added bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers labels May 31, 2019
@egamma
Copy link
Member

egamma commented Jun 6, 2019

Closing: the user has to define workspaceMount in this setup.

@Chuxel
Copy link
Member

Chuxel commented Jun 10, 2019

Actually this is still an issue.

@Chuxel Chuxel reopened this Jun 10, 2019
@Chuxel
Copy link
Member

Chuxel commented Jun 10, 2019

The specific issue here that is still outstanding is with the .gitconfig volume mount resulting in an invalid mount point. The mount does not fail anymore (see #489) which reduces the priority of the the main issue (except for on LCOW #29). However, Docker automatically creates a new path on the host to support the .gitconfig volume mount -- which pollutes the remote OS and could have other implications we haven't uncovered yet. For example, on my mac, .gitconfig is under /Users/chuck/.gitconfig for a user. Here's what I see on my remote Ubuntu SSH machine:

📁 Users
     📁 chuck
          📁 .gitconfig
📁 home
     📁 clantz
          📁 .ssh
          📁 .vscode-server
          📁 Repos
          📄 .gitconfig

The Users directory tree is created by Docker as a result of specifically the .gitconfig volume mount that you cannot override right now. The good news it doesn't bomb, but we need a way to disable this behavior to really fix this issue for good.

@chrmarti chrmarti added this to the June 2019 milestone Jun 12, 2019
@wmeints
Copy link

wmeints commented Jun 20, 2019

This also fails when you're using Docker Desktop on Windows. I would expect for it to work normally there as this is a scenario that is widely used.

@Chuxel
Copy link
Member

Chuxel commented Jun 20, 2019

@wmeints If you running into trouble while using Docker locally, then that's a separate issue. Docker for Windows is known to work (I use it every day 😊). If you are using Windows containers (less common), then that's #29. But, if you're running Linux containers, it would be great if you'd raise an issue on it with your log details so we can try to help you sort it out.

@wmeints
Copy link

wmeints commented Jun 20, 2019

Thanks for the kind reply. I investigated it further and found some really weird behavior. I Will open a separate issue for that.

@chrmarti
Copy link
Contributor

Verifier: The fix was to copy the .gitconfig into the container instead of trying to mount it. https://github.com/microsoft/vscode-remote-containers/commit/4f76bf525bc138e8fbc2bbfdc21f19c406e4cefa

Verify that the .gitconfig (if it exists in your local home folder) is indeed copied to the container (if it does not exist there yet) when the container is first created (but not later, e.g., after manually deleting it from the container).

@roblourens roblourens added the verified Verification succeeded label Jun 28, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants