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

chore: run devcontainer as root #14652

Merged
merged 6 commits into from Mar 16, 2022
Merged

chore: run devcontainer as root #14652

merged 6 commits into from Mar 16, 2022

Conversation

viceice
Copy link
Member

@viceice viceice commented Mar 14, 2022

Changes

explicitly set container user

Context

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@viceice
Copy link
Member Author

viceice commented Mar 14, 2022

Works for me on WSL v2 and Windows 11. Don't have access to codespaces, so can't test there

/cc @fgreinacher

@fgreinacher
Copy link
Contributor

Sorry, still the same problem in Codespaces:

image

@viceice
Copy link
Member Author

viceice commented Mar 14, 2022

Sorry, still the same problem in Codespaces:

image

So it seems codespaces make something really bad 😕 I really like to have codespace access to debug that

@viceice
Copy link
Member Author

viceice commented Mar 14, 2022

@fgreinacher Can you test again?

@fgreinacher
Copy link
Contributor

@fgreinacher Can you test again?

Sure! Same problem with root in the Dockerfile. It's working though when I change remoteUser to root.

@viceice
Copy link
Member Author

viceice commented Mar 14, 2022

So the /tmp is still missing the writable flag for others?

@fgreinacher
Copy link
Contributor

fgreinacher commented Mar 14, 2022

No unix permissions pro, but the permissions don't seem to allow user to create files:

image

Not sure, but the group section does not have the w flag set, which seems a bit weird to me.

@viceice
Copy link
Member Author

viceice commented Mar 14, 2022

I think we should run as root too. the vscode containers will do so too.

> docker run --rm -it mcr.microsoft.com/vscode/devcontainers/javascript-node:16 bash -c 'echo $EUID'
0

That will fix the permission issues

@viceice viceice changed the title chore: explicitly set devcontainer user chore: run devcontainer as root Mar 14, 2022
@viceice viceice requested a review from JamieMagee March 14, 2022 16:20
@fgreinacher
Copy link
Contributor

It's working now with a fresh Codespace!

@viceice
Copy link
Member Author

viceice commented Mar 14, 2022

It's working now with a fresh Codespace!

With root or the version before?

@fgreinacher
Copy link
Contributor

With the recent version, root in the Dockerfile

@viceice viceice enabled auto-merge (squash) March 15, 2022 06:36
@rarkins
Copy link
Collaborator

rarkins commented Mar 15, 2022

Does this mean Codespaces will work out of the box?

@viceice
Copy link
Member Author

viceice commented Mar 15, 2022

Does this mean Codespaces will work out of the box?

Yes. @fgreinacher tested it.

@fgreinacher
Copy link
Contributor

Yes, it works flawlessly with newly created Codespaces 🎉

image

@JamieMagee
Copy link
Contributor

Works for me on WSL v2 and Windows 11. Don't have access to codespaces, so can't test there

I thought codespaces was open to everyone now?

@rarkins rarkins merged commit ce82a88 into main Mar 16, 2022
@rarkins rarkins deleted the viceice-patch-1 branch March 16, 2022 04:16
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 32.6.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot build in devcontainer
5 participants