summaryrefslogtreecommitdiff
path: root/Dockerfile
blob: 56a182f141b672b7e457de9bf2057fffa30fda46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Use the official Python 3.9 slim image as the base image
FROM python:3.9-slim as builder

# Set the working directory
WORKDIR /app

# Install system dependencies required for Poetry
RUN apt-get update && \
    apt-get install --no-install-recommends -y curl && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# Install Poetry
RUN curl -sSL https://install.python-poetry.org | python -

# Add Poetry to the PATH
ENV PATH="/root/.local/bin:${PATH}"

# Copy the pyproject.toml files
COPY pyproject.toml ./

# Install the project dependencies
RUN poetry config virtualenvs.create false \
    && poetry install --no-dev --no-interaction --no-ansi --no-root

# Copy the rest of the application code
COPY . .

# Run the application using 'poetry run krr simple'
CMD ["python", "krr.py", "simple"]