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

Clarifications on limitations of mounting .vscode-server, WSL tip clarification #2988

Merged
merged 2 commits into from
Aug 19, 2019

Conversation

Chuxel
Copy link
Member

@Chuxel Chuxel commented Aug 16, 2019

Partial resolution to microsoft/vscode-remote-release#1153

Also drops mention of adding Windows system path into WSL path in the troubleshooting article as this is no longer required.

@Chuxel Chuxel requested review from gregvanl and chrmarti August 16, 2019 23:27

Replace `your-volume-name-goes-here` with a unique volume name for the container in `devcontainer.json` as follows:
1. **If you are using a non-root user**, you'll need to ensure your Dockerfile creates `~/.vscode-server` and/or `~/.vscode-server-insiders` in the container. If you do not do this, the folder will be owned by root and your connection will fail with a permissions issue. See [Adding a non-root user to your dev container](#adding-a-non-root-user-to-your-dev-container) for full details, but you can use this snippet in your Dockerfile to create the folders for a `vscode` user:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe refer to "the non-root user" instead of "a vscode user", otherwise users might think that naming a user vscode makes it somehow special?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I just noticed a typo in the later section - I changed this to user-name-goes-here for exactly the reason you mention, but didn't do it everywhere. Will submit a PR for that correction.

```
```Dockerfile
ARG USERNAME=vscode
RUN mkdir -p /home/$USERNAME/.vscode-server /home/$USERNAME/.vscode-server-insiders \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would:

USER someuser
RUN mkdir -p ~/.vscode-server ...

work and make it easier to apply?

Copy link
Member Author

@Chuxel Chuxel Aug 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would cause the commands that follow to run as the user specified. If you've opted not to install sudo for security reasons, switching to the other user would be the last step. This is also a partial of the full code that creates the user in that section

"runArgs": [
"-v", "unique-vol-name-here:/root/.vscode-server",
// And/or for VS Code Insiders
"-v", "unique-vol-name-here-insiders:/.vscode-server-insiders",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be easier to only show the code for stable and add a note in the text that the same applies for the insiders folder?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had it that way, but then you need to say "also insiders" in each spot where this is needed, which actually ended up taking up more space and was easy to miss. This was a bit more concise and allows you to use both versions - cut and paste also covers both use cases so people don't have to think as much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants