2023-09-28 15:51:28 +03:00
|
|
|
FROM python:slim
|
2022-12-02 16:52:16 +03:00
|
|
|
|
2023-10-06 03:22:37 +03:00
|
|
|
ENV PYTHONDONTWRITEBYTECODE 1
|
|
|
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
|
ENV GIT_SSH_COMMAND "ssh -v"
|
|
|
|
|
WORKDIR /app
|
2023-10-06 03:24:40 +03:00
|
|
|
RUN apt-get update && apt-get install -y git build-essential
|
2023-10-06 03:22:37 +03:00
|
|
|
RUN pip install poetry
|
2023-10-06 03:31:45 +03:00
|
|
|
|
|
|
|
|
# Copy only requirements to cache them in docker layer
|
|
|
|
|
COPY pyproject.toml poetry.lock /app/
|
|
|
|
|
|
|
|
|
|
# Project initialization:
|
|
|
|
|
RUN poetry config virtualenvs.create false \
|
|
|
|
|
&& poetry install --no-interaction --no-ansi
|
|
|
|
|
|
|
|
|
|
# Copy project files into the docker image
|
|
|
|
|
COPY . /app
|