Skip to content

Latest commit

 

History

History
16 lines (16 loc) · 719 Bytes

HowToAddNonRootUser.org

File metadata and controls

16 lines (16 loc) · 719 Bytes

How to set non-root user of docker for vscode globally

Simple way: ~/.config/Code/User/.devcontainer/devcontainer.json

{
  "remoteUser": "your-non-root-user"
}

More Complicate way:

  1. find ‘Dev containers’ in the Extensions window
  2. click ‘Manage’ button
  3. in the drop-down menu click ‘Add to devcontainer.json’
  4. pop up window in the right-down side will prompt ‘Extension is already included in Dev Container configuration’
  5. 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
  6. add “remoteUser”: “your-non-root-user” under the json’s root node.
  7. reopen vscode