-
-
Save gbdlin/311dda3cd34672370cd97bf07f306a61 to your computer and use it in GitHub Desktop.
Example pyproject.toml and a docker file to show the issue with poetry erasing it's own dependencies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM python:3.9.1 | |
| WORKDIR /code | |
| COPY poetry.lock pyproject.toml ./ | |
| RUN pip install --upgrade pip && \ | |
| pip install poetry && \ | |
| poetry config virtualenvs.create false && \ | |
| poetry install --no-dev | |
| COPY . ./ | |
| CMD ["python", "app/main.py"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [tool.poetry] | |
| name = "example" | |
| version = "0.0.0" | |
| description = "example package" | |
| authors = ["author@example.com"] | |
| [tool.poetry.dependencies] | |
| python = "^3.9" | |
| [tool.poetry.dev-dependencies] | |
| appdirs = "^1.4.4" | |
| [build-system] | |
| requires = ["poetry>=0.12"] | |
| build-backend = "poetry.masonry.api" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment