microsoft / microsoft/vscode-remote-release

wrong user permission in devcontainer when using docker-compose and remoteUser

Open
#9,641 7 comments 0 reactions 1 assignee View on GitHub

@chrmarti is already working on this.

Since Mar 7, 2024.

containers under-discussion
Dominant language
Dockerfile
Stars
4.2k
Forks
469
Avg merge
1d 1h
Merged PRs (30d)
1

Description

  • VSCode Version: 1.87.0
  • Local OS Version: Mint 21.3 / Ubuntu 22.04 Jammy
  • Remote OS Version: N/A
  • Remote Extension/Connection Type: Containers

Steps to Reproduce:

  1. Clone https://github.com/jdratlif/devcontainer-test
  2. Open backend devcontainer
  3. Open terminal and run ls -l.
  4. Files should be owned by docker user.
  5. Open frontend devcontainer
  6. Open terminal and run ls -l.
  7. Files will be owned by whatever UID cloned the git repo locally. Depends on the system. If your local user ID is 1000, this problem will be masked because the inside and outside docker UIDs are the same.

I expected that the files in both containers would be owned by the docker user. I am the docker user in both containers, but the UIDs are not being fixed.

Here is a two minute video demonstrating the entire problem on a fresh Linux Mint 21.3 VM. New docker and VS code install. Local user pve added to docker group. Only extension is devcontainers. Everything is current as of 2024-03-06.

https://technoplaza.net/temp/devcontainer-issue-20240306.mp4

My firefox couldn't play the h265 video captured by OBS, but chrome and smplayer worked.

Does this issue occur when you try this locally?: Yes
Does this issue occur when you try this locally and all extensions are disabled?: Yes

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.