Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takuan-osho/2ad74e559b22291cc9daea4aa7e9750b to your computer and use it in GitHub Desktop.
Save takuan-osho/2ad74e559b22291cc9daea4aa7e9750b to your computer and use it in GitHub Desktop.
Dockerfile for python with poetry
FROM python:3.7-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHINUNBUFFERED 1
WORKDIR /code
COPY poetry.lock pyproject.toml /code/
RUN pip install poetry
RUN poetry config settings.virtualenvs.create false
RUN poetry install --no-interaction
COPY . /code/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment