FROM python:3.12.6
RUN mkdir -p /data
RUN mkdir -p /conf
RUN mkdir -p /app

RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
RUN pip install poetry


COPY ./config.yaml /conf/

COPY example.json /data/otel.json
COPY ./pyproject.toml /app
COPY ./README.md /app


WORKDIR /app
RUN poetry config virtualenvs.in-project true
RUN poetry install

COPY oteldatareplay /app/oteldatareplay
RUN poetry install
COPY kafka-python /app/kafka-python
RUN /app/.venv/bin/pip install /app/kafka-python

#ENTRYPOINT ["tail" , "-f", "/dev/null"]
ENTRYPOINT ["/app/.venv/bin/python" , "-m", "oteldatareplay",  "-c",  "/conf/config.yaml"]



