-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
17 lines (13 loc) · 760 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
FROM python:3.8.12-slim
RUN apt-get update && apt-get install -y git curl
ENV POETRY_HOME=/etc/poetry
RUN curl -sSL https://install.python-poetry.org | python3 -
ENV PATH "$POETRY_HOME/bin:$PATH"
RUN poetry config virtualenvs.create false
# Install python dependencies. Note that poetry installs any root packages by default, but this is not available at this
# stage of caching dependencies. So we do a dependency-only install here to cache the dependencies, then a full poetry
# install post-create to install the root package, which will change more rapidly than dependencies.
COPY pyproject.toml poetry.lock ./
RUN poetry install --no-ansi --no-interaction --only=main --no-root -v
COPY . .
RUN poetry install --no-ansi --no-interaction --only=main -v