Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devcontainer only starts under user vscode #7331

Closed
jfaleiro opened this issue Oct 11, 2022 · 5 comments
Closed

devcontainer only starts under user vscode #7331

jfaleiro opened this issue Oct 11, 2022 · 5 comments
Assignees
Labels
containers Issue in vscode-remote containers info-needed Issue requires more information from poster

Comments

@jfaleiro
Copy link

jfaleiro commented Oct 11, 2022

  • VSCode Version: 1.72.1 (Universal)
  • Local OS Version: MacOS Monterrey 12.6 M1
  • Remote OS Version: mcr.microsoft.com/vscode/devcontainers/java:0-11-bullseye
  • Remote Extension/Connection Type: Containers
  • Logs:

Steps to Reproduce:

As of this morning devcontainer only starts under user vscode. It no longer starts under root.

The runArgs parameter in devcontainer.json and USER command in Dockerfile are ignored.

Parameters remoteUser or containerUser in devcontainer.json are also ignored.

This is affecting multiple environments.

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

@jfaleiro jfaleiro changed the title devcontainer no longer allows root rim devcontainer no longer allows root remoteUser Oct 11, 2022
@jfaleiro jfaleiro changed the title devcontainer no longer allows root remoteUser devcontainer no longer allows root as a remoteUser or containerUser Oct 11, 2022
@jfaleiro jfaleiro changed the title devcontainer no longer allows root as a remoteUser or containerUser devcontainer only starts under vscode user Oct 11, 2022
@jfaleiro jfaleiro changed the title devcontainer only starts under vscode user devcontainer only starts under user vscode Oct 11, 2022
@github-actions github-actions bot added the containers Issue in vscode-remote containers label Oct 11, 2022
@ggravlingen
Copy link

I had some user-related issues as well yesterday and it sounds a bit related to this. I haven't seen the errors before so my guess is that there have been some changes in upstream docker images? I'm using the mcr.microsoft.com/vscode/devcontainers* images for my containerised environments.

In my Dockerfile I had the following lines:

ENV LOCAL_USER="vscode"
USER $LOCAL_USER

This caused the build to crash. When removing the line USER $LOCAL_USER it worked again but led to a lot of workarounds since I actually wanted the subsequent actions to be made by the local user.

So I tried changing that same line to USER 1000 and that actually solved the issue for me. Now I can build my containerised environments again.

@chrmarti
Copy link
Contributor

@jfaleiro Try adding "remoteUser": "root" to your devcontainer.json.

@ggravlingen See #7303 (comment) for a workaround with ENV and USER.

@chrmarti chrmarti self-assigned this Oct 12, 2022
@chrmarti chrmarti added the info-needed Issue requires more information from poster label Oct 12, 2022
@jfaleiro
Copy link
Author

@jfaleiro Try adding "remoteUser": "root" to your devcontainer.json.

@chrmarti please see above, that was one of the first fixes we tried, after making changes, Dev Container: Rebuild Container ignores the changes and starts under vscode user again.

The runArgs parameter in devcontainer.json and USER command in Dockerfile are ignored.
Parameters remoteUser or containerUser in devcontainer.json are also ignored.

@github-actions
Copy link

Hey @chrmarti, this issue might need further attention.

@jfaleiro, you can help us out by closing this issue if the problem no longer exists, or adding more information.

@github-actions
Copy link

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 18, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
containers Issue in vscode-remote containers info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants