I'm using VSCode with the Docker extension. I'm connecting to docker on a remote machine through SSH. When I click on a container in the docker extension and do "Attach Visual Studio Code" if the container was started with the root user then it attaches fine. If it was started with a different uid/gid then I get the following. Not that the image has the user and groups setup correctly from the dockerfile.
[4909 ms]
[4910 ms] Start: Run in container: cat /etc/passwd
[4947 ms] User 33333:45678 not found in /etc/passwd.
[4948 ms] Start: Run in container: test -d /root/.vscode-server
[4982 ms]
[4982 ms]
[4982 ms] Exit code 1
[4982 ms] Start: Run in container: test -d /root/.vscode-remote
[5019 ms]
[5019 ms]
[5019 ms] Exit code 1
[5019 ms] Start: Run in container: set -o noclobber ; mkdir -p '/root/.vscode-server/data/Machine' && { > '/root/.vscode-server/data/Machine/.writeMachineSettingsMarker' ; } 2> /dev/null
[5057 ms]
[5057 ms] mkdir: cannot create directory ‘/root’: Permission denied
[5058 ms] Exit code 1
[5059 ms] Start: Run in container: test -d /root/.vscode-server/bin/d5e9aa0227e057a60c82568bf31c04730dc15dcd
[5095 ms]
[5096 ms]
[5096 ms] Exit code 1
[5096 ms] Installing VS Code Server for commit d5e9aa0227e057a60c82568bf31c04730dc15dcd
[5096 ms] Start: Run in container: mkdir -p /root/.vscode-server/bin/d5e9aa0227e057a60c82568bf31c04730dc15dcd_1595365126276
[5133 ms]
[5134 ms] mkdir: cannot create directory ‘/root’: Permission denied
[5134 ms] Exit code 1