FROM python:3.8.14-slim-bullseye

RUN apt update && apt install -y gcc && apt install -y librdkafka-dev

RUN useradd --create-home --shell /bin/bash app_user

WORKDIR /home/app_user

COPY requirements.txt ./

RUN pip install --no-cache-dir -r requirements.txt

USER app_user

COPY src/ ./src/

ENTRYPOINT [ "python", "src/run.py" ]
