I landed on using archlinux as my base image. I use chaoti-aur to install the latest poetry from git, I can choose the exact Python version I want thanks to pyenv (made it conveniant by adding this as an env var, PYTHON_VERSION).
You can install your poetry package after copying it to your WORKDIR by poetry install --no-dev. Flush the poetry cache by poetry cache clear --all; no neat way to do this yet #887.
- Installing poetry through
pacmaninstalls the poetry as root. Poetry installer is rootless by default, which is not production-friendly; it is now! Don't forget to switch to a user wihtout write-access to root! Otherwise, you won't benefit from this safety feature. - Separation of Python used for production code, and poetry code. Poetry will run on the latest stable version of Python, while production code will run on whatever version it was designed for.
- Less maintanance of `dockerf