Skip to content
This repository has been archived by the owner on Mar 22, 2021. It is now read-only.

Non root user in dev container #3

Closed
wants to merge 2 commits into from
Closed

Conversation

mgjm
Copy link
Collaborator

@mgjm mgjm commented Jan 29, 2020

Closes #2.

@mgjm mgjm added the feature New feature or request label Jan 29, 2020
@mgjm mgjm changed the title Feature: Non root user in dev container Non root user in dev container Jan 29, 2020
@rs22
Copy link
Member

rs22 commented Jan 30, 2020

Could you clarify why this is necessary? The original issue says:

Required for X-Window and prevents ownership bugs with git.

I haven't had issues related to UIDs before when running X11 applications inside a Docker container that connect to an XServer on the host.

Regarding file permissions: The VSCode docs say that if a Dockerfile is given in the devcontainer config, it will automatically inject the UID of the current user (on a Linux host). So there should be no need to hardcode UID=1000?

https://aka.ms/vscode-remote/containers/non-root

On Linux, if you are referencing a Dockerfile or image in devcontainer.json, this will also automatically update the container user's UID/GID to match your local user to avoid the bind mount permissions problem that exists in this environment (unless you set "updateRemoteUserUID": false).

(I'm not sure if this requires setting the remoteUser configuration option)

@rs22
Copy link
Member

rs22 commented Mar 10, 2020

What is the status of this issue? Does anyone need the container user to be non-root, or can we close this?

@arneboockmeyer
Copy link
Collaborator

As just discussed with @rs22 we close this one until somebody needs it again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User id in devcontainer
3 participants