Simple way: ~/.config/Code/User/.devcontainer/devcontainer.json
{
"remoteUser": "your-non-root-user"
}
More Complicate way:
- find ‘Dev containers’ in the Extensions window
- click ‘Manage’ button
- in the drop-down menu click ‘Add to devcontainer.json’
- pop up window in the right-down side will prompt ‘Extension is already included in Dev Container configuration’
- click the link of ‘Dev Container configuration’ and open the file like: ~/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/imageConfigs/ubuntu%3a22.json
- add “remoteUser”: “your-non-root-user” under the json’s root node.
- reopen vscode