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

Does not work with LCOW #29

Closed
giggio opened this issue May 2, 2019 · 13 comments
Closed

Does not work with LCOW #29

giggio opened this issue May 2, 2019 · 13 comments
Assignees
Labels
containers Issue in vscode-remote containers feature-request Request for new features or functionality info-needed Issue requires more information from poster windows Issue on Windows

Comments

@giggio
Copy link

giggio commented May 2, 2019

  • VSCode Version: insiders
  • Local OS Version: Microsoft Windows [Version 10.0.17763.437]
  • Remote OS Version: does not matter
  • Remote Extension/Connection Type: Docker

Steps to Reproduce:

  1. Use Docker for Windows with Windows containers
  2. Pull a Linux version, i.e. docker pull --platform=linux node:12.
  3. Use that image on your remote settings
  4. Try to open the folder remotely

When you try to open the folder it fails. This is related to moby/moby#35425
You get an error invalid mount config for type "bind": source path must be a directory. because of the .gitconfig file from HOME.

Does this issue occur when you try this locally?: N/A
Does this issue occur when you try this locally and all extensions are disabled?: N/A

@kieferrm kieferrm added containers Issue in vscode-remote containers windows Issue on Windows labels May 2, 2019
@egamma egamma added the feature-request Request for new features or functionality label May 3, 2019
@egamma
Copy link
Member

egamma commented May 3, 2019

@giggio this is a known limitation.

@Chuxel we should mention this in the docs.

@jsheetzati
Copy link

Are we able to customize the run command? I want to replace how the extension is binding the .gitconfig. I rather just have it bind the entire directory to get around the limitation.

@Chuxel
Copy link
Member

Chuxel commented Jun 10, 2019

@jsheetzati The runArgs property in devcontainer json lets you specify additional volume mounts (e.g. via -v or --mount). You can also change the default mount using the workspaceMount property combined with workspaceFolder to tell VS Code where you set the mount point in the container. The workspaceMount property supports anything the --mount property supports.

@jsheetzati
Copy link

Thanks @Chuxel. I was playing around with those options, but it seems like there is not a way to customize how .gitconfig gets binded. Due to LCOW not supporting binding a single file, I was hoping to override the .gitconfig binding and just bind my entire user directory.

Run: docker run -a STDOUT -a STDERR --mount src=c:\Dev\cea\Web,dst=/workspace,type=bind -v /host_mnt/c/Users/jsheetz/.gitconfig:/root/.gitconfig -l vsch.quality=stable -l vsch.local.folder=c:\Dev\cea\Web -l vsch.remote.devPort=0 vsc-web-8b25b88147e98f539fb8bcaaf880810d /bin/sh -c echo Container started ;  while sleep 1; do :; done
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: invalid volume specification: '/host_mnt/c/Users/jsheetz/.gitconfig:/root/.gitconfig'.

@Chuxel
Copy link
Member

Chuxel commented Jun 10, 2019

@jsheetzati Ahhh go it - that's the key. Very good to know - thank you for clarifying. @chrmarti - FYI. I know we've talked about giving the option to alter the .gitconfig mount for other reasons (#509), but this is another hit on that particular issue.

@chrmarti
Copy link
Contributor

I would prefer not having a separate property in the devcontainer.json for this.

We could allow an array for workspaceMount and have the default include the .gitconfig mount. You could then overwrite both the workspace and the .gitconfig mounts by setting that property. 🤔

@Chuxel
Copy link
Member

Chuxel commented Jun 12, 2019

@chrmarti That works from my perspective. Would both a string or single entry then omit the .gitconfig mapping? Or just an array with one value?

@chrmarti
Copy link
Contributor

The presence of the property would omit the .gitconfig mapping unless it is explicitly included.

Another option would be to copy the .gitconfig over if the exists on the host, but not in the container. (We currently have to inspect the image to get at the home folder in /etc/passwd before we launch the actual container with the .gitconfig mount which takes another slice of our startup time.)

@Chuxel
Copy link
Member

Chuxel commented Aug 30, 2019

I believe this is now resolved since we're copying the .gitconfig file rather than mounting it, correct?

@jsheetzati
Copy link

Unfortunately, still seeing issues using LCOW.

Run: docker cp 61de04ed6b185c746f9bc34c8e696347046420abc76bc70388b7b315001fa558:/etc/passwd -
Error response from daemon: filesystem operations against a running Hyper-V container are not supported

Command failed: C:\Program Files\Docker\Docker\Resources\bin\docker.exe cp 61de04ed6b185c746f9bc34c8e696347046420abc76bc70388b7b315001fa558:/etc/passwd -

@chrmarti
Copy link
Contributor

We no longer mount any files into the container (unless configured in the devcontainer.json) and we no longer use docker cp. Is this still an issue? If so, what does the log show?

@chrmarti chrmarti added the info-needed Issue requires more information from poster label Oct 13, 2020
@giggio
Copy link
Author

giggio commented Oct 16, 2020

@chrmarti I'm not sure, I haven't use LCOW in a long time. After WSL2 and it's Docker integration I don't need it anymore. If nobody can produce a repro, feel free to close the issue.

@chrmarti
Copy link
Contributor

@giggio Thanks, closing then.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
containers Issue in vscode-remote containers feature-request Request for new features or functionality info-needed Issue requires more information from poster windows Issue on Windows
Projects
None yet
Development

No branches or pull requests

6 participants