You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use the Rust dev container from a Linux system with a user with UID 1001 and GID 1001 via rootless Docker. As such, the permissions for the vscode user in the home directory seem to work fine:
Dev container home folder:
$ ls -lahn /home/vscode/
total 56K
drwxr-xr-x 1 1001 1001 4.0K Mar 31 22:59 .
drwxr-xr-x 1 0 0 4.0K Mar 5 18:13 ..
-rw-r--r-- 1 1001 1001 220 Mar 27 2022 .bash_logout
-rw-r--r-- 1 1001 1001 4.9K Mar 5 18:13 .bashrc
[...]
drwxr-xr-x 6 1001 1001 4.0K Mar 31 22:59 .vscode-server
-rw-r--r-- 1 1001 1001 22 Mar 5 18:13 .zprofile
-rw-r--r-- 1 1001 1001 3.9K Mar 5 18:13 .zshrc
However, the workspace /workspaces/project itself is mounted being owned by root (UID=0 and GID=0):
$ ls -lahn
total 120K
drwxrwxr-x 8 0 0 4.0K Mar 31 20:53 .
drwxr-xr-x 3 0 0 4.0K Mar 31 22:59 ..
-rw-rw-r-- 1 0 0 69K Mar 31 20:05 Cargo.lock
-rw-rw-r-- 1 0 0 303 Mar 31 20:05 Cargo.toml
drwxrwxr-x 2 0 0 4.0K Mar 31 20:05 data
drwxrwxr-x 2 0 0 4.0K Mar 31 21:48 .devcontainer
[...]
drwxrwxr-x 6 0 0 4.0K Mar 31 20:05 src
In contrast, the host project directory is owned by UID/GID 1001:
$ ls -lahn
total 120K
drwxrwxr-x 8 1001 1001 4.0K Mar 31 20:53 .
drwxrwxr-x 13 1001 1001 4.0K Mar 31 20:05 ..
drwxrwxr-x 2 1001 1001 4.0K Mar 31 21:48 .devcontainer
drwxrwxr-x 8 1001 1001 4.0K Mar 31 20:05 .git
drwxrwxr-x 2 1001 1001 4.0K Mar 31 20:53 .github
-rw-rw-r-- 1 1001 1001 32 Mar 31 20:05 .gitignore
-rw-rw-r-- 1 1001 1001 69K Mar 31 20:05 Cargo.lock
[...]
drwxrwxr-x 6 1001 1001 4.0K Mar 31 20:05 src
When changing the owner UID/GID in the container to 1001:1001, the host permissions are screwed up:
$ ls -lahn
total 124K
drwxrwxr-x 9 166536 166536 4.0K Apr 1 09:58 .
drwxrwxr-x 13 1001 1001 4.0K Mar 31 20:05 ..
drwxrwxr-x 2 166536 166536 4.0K Mar 31 21:48 .devcontainer
drwxrwxr-x 8 166536 166536 4.0K Mar 31 20:05 .git
drwxrwxr-x 2 166536 166536 4.0K Mar 31 20:53 .github
-rw-rw-r-- 1 166536 166536 32 Mar 31 20:05 .gitignore
-rw-rw-r-- 1 166536 166536 69K Mar 31 20:05 Cargo.lock
[...]
drwxrwxr-x 6 166536 166536 4.0K Mar 31 20:05 src
drwxr-xr-x 3 166536 166536 4.0K Apr 1 09:58 target
I am trying to use the Rust dev container from a Linux system with a user with UID 1001 and GID 1001 via rootless Docker. As such, the permissions for the
vscode
user in the home directory seem to work fine:Dev container home folder:
However, the workspace
/workspaces/project
itself is mounted being owned by root (UID=0 and GID=0):In contrast, the host project directory is owned by UID/GID 1001:
When changing the owner UID/GID in the container to
1001:1001
, the host permissions are screwed up:This is my
devcontainer.json
:I added the last four entries trying to fix the issue, alas without success.
The text was updated successfully, but these errors were encountered: