Used for poetry packages management with docker
required docker and optionally docker compose
curl -sSL https://install.python-poetry.org | python3 -Generate poetry.lock and requirements.txt in container for any version of python3 and poetry
- copy
pyproject.tomlfile topoetrydir - In Dockerfile set
pythonversion the same as inpyproject.tomlandpoetryversion which will be used
docker build --build-arg USER=$USER -t poetry-python . && docker run --rm -u $USER -v $PWD/poetry:/poetry poetry-pythondocker compose up --buildscript will generate poetry.lock and requirements.txt files in poetry directory
poetry export -f requirements.txt --with dev --without-hashes --output requirements.txt