How to install poetry in a DevContainer environment? -- I am confused about access rights. #8182
Unanswered
PeterBosch2
asked this question in
Q&A
Replies: 1 comment 1 reply
-
|
I still don't actually know what a dev container is, so this might not be useful, I'm very confused as to how they're supposed to be used. e.g. installing tab completions in a container seems useless to me. Can you not install poetry as the user that's going to run the container? USER user ? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I spent quite some time in getting
poetryproperly installed into a DevContainer. Access rights are the pain or the question whether to installpoetryas root or as a container user, such as "vscode".I understand
pipxas the suggested method to install poetry in an environment. So, issuingpipxin the Dockerfile (as root) seems to be the way to go.However, this approach leads to a dead end when the container user wants to install something to
poetry selfpoetry self add "poetry-dynamic-versioning[plugin]"this fails for obvious reasons as
poetrywants to install to thevenvcreated bypipxas root.Installing poetry as the container user is a bit of guess work "who the container user will be". Changes to the container image might lead to a different user.
What is the best way to go? Any suggestions/hints/help are appreciated!
Beta Was this translation helpful? Give feedback.
All reactions