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

fix(parking-sensors): changed from root to non-root devcontainer #647

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

StromFLIX
Copy link

⚠️ BLOCKED BY: #644

Type of PR

  • Code changes

Purpose

In bug #646 we see a permission error on wsl when setting up the dev container with the root user

Author pre-publish checklist

  • Added test to prove my fix is effective or new feature works
  • No PII in logs
  • Made corresponding changes to the documentation

Validation steps

Run the devcontainer in wsl like described in the issue #646

Issues Closed or Referenced

@StromFLIX StromFLIX changed the title Fix/646 ownership in wsl fix(parking-sensors): changed from root to non-root devcontainer Aug 10, 2023

# Set user to non-root user to get rid of permission errors
USER $USERNAME
Copy link

@cpeeyush cpeeyush Aug 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it is in draft, But just adding my thoughts here to keep track:

  1. We need to update docker-compose , devcontainer.json as well. And docker-compose should specify the user so that mounted workspace usages the same permission.
  2. I think it will be good if switch to $USERNAME before we copy the files otherwise still there will some files owner by root.
  3. We need to create virtual env in a location which is owned by $USERNAME otherwise in devcontainer we will not be able to add new dependencies without switching to root first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Devcontainer in parking sensors sample changes file ownership in linux/wsl
2 participants