Skip to content

Instantly share code, notes, and snippets.

@hacker-volodya
Created March 17, 2020 10:04
Show Gist options
  • Save hacker-volodya/c42513a062829322f22ce2e83b5f7dae to your computer and use it in GitHub Desktop.
Save hacker-volodya/c42513a062829322f22ce2e83b5f7dae to your computer and use it in GitHub Desktop.
Dockerfile for poetry project
FROM python:3.8
RUN mkdir /app
WORKDIR /app
RUN pip install poetry
RUN poetry config virtualenvs.create false
COPY poetry.lock pyproject.toml /app/
RUN poetry install -n --no-root --no-dev
# poetry dependencies installed, here you may want to copy your project package, set command for container, etc.
# all dependencies was installed without virtualenv, so you don't have to use `poetry run` in container
COPY my_package /app/my_package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment