Skip to content

Instantly share code, notes, and snippets.

@gbdlin
Created April 16, 2021 15:32
Show Gist options
  • Select an option

  • Save gbdlin/311dda3cd34672370cd97bf07f306a61 to your computer and use it in GitHub Desktop.

Select an option

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
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"]
[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