Skip to content

How to install poetry inside a docker container ? #3933

Answered by abn
aahnik asked this question in Q&A
Discussion options

You must be logged in to vote
  • is the Dockerfile I made, safe to use for real applications?

There is nothing obvious that is wrong here. Maybe cleanup after your apt-get upgrade.

  • why do I need to source $HOME/.poetry/env every time? How to add poetry to the path, once and for all?

This is because source <file> only applies to the current shell, and each RUN executes in a new shell. To make it permanent, you can add the command to /etc/profile.d/poetry.sh and also add bash completions if you so desired to /etc/bash_completion.d/poetry.

Update: Here https://python-poetry.org/docs/ get-poetry.py is used. But in README, it says deprecated?

The live docs are related to the current stable version. The documentation…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@abn
Comment options

@abn
Comment options

Comment options

You must be logged in to vote
2 replies
@aahnik
Comment options

@rashid200gb
Comment options

Answer selected by aahnik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants