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
-
I spent quite some time in getting
poetry
properly installed into a DevContainer. Access rights are the pain or the question whether to installpoetry
as root or as a container user, such as "vscode".I understand
pipx
as the suggested method to install poetry in an environment. So, issuingpipx
in 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 self
poetry self add "poetry-dynamic-versioning[plugin]"
this fails for obvious reasons as
poetry
wants to install to thevenv
created bypipx
as 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