FROM python:3.11-slim

RUN apt-get update && apt-get install -y --no-install-recommends \
    git \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /action

COPY app/ /action/app/
COPY entrypoint.sh /entrypoint.sh

RUN pip install --no-cache-dir -r /action/app/requirements.txt && \
    chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
