vscode-remote-release
vscode-remote-release copied to clipboard
[New feature] Abilities to set the remoteUser globally.
Hello,
Following https://github.com/microsoft/vscode-remote-release/issues/1155, remoteUser must be set for each project in the .json file of the container.
As I think this is a pretty common problem because of the nature of the subject:
- docker is mean to run service, so "docker exec" (without --user argurment) log as the service user (could be nginx, httpd, php, etc...)
- vscode is mean to edit files on the container (usually a specific data user) Both are clearly not the same user very often, so the remoteUser is really very important.
When working with container, it means, each project need to have the container attached to vscode. This means for each project editing the .json file...
It lead us to the point of this issue ; ) Being able to set this user globally. In a corporate environment handling many project container are "formated" so each project have the same forms (at least at the permission level). So handling this remoteUser settings directly on the vscode remote-container config seems a good things.
Purpose of this issue is adding the remoteUser parameter in the vscode settings.json so:

For the record, in our digital agency, we get a container for each project and having this settings will greatly simplify the use. Just to click Connect to Container and all will be ok.
Thanks for reading me.
Got the same requirement. Attached container configuration should be available globaly at the user level or in the globalStorage of the extension. This may collapse with the existing "Remote › Containers: Default Extensions"
My use case is attaching to a running distrobox container. In my case the initial state is no container config file (devcontainer.json etc.), so it's impractical to set the "remoteUser" before the Dev Containers extension creates a mess of e.g. ~/.vscode-server installation with the wrong owner.