FROM python:3.12-slim

RUN apt-get update && apt-get install -y \
    git \
    curl \
    wget \
    ca-certificates \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app
RUN git clone https://github.com/emilybache/GildedRose-Refactoring-Kata.git . && git checkout main

RUN pip install pytest

# Verify the source code and pytest are available
RUN cd python && python -c "from gilded_rose import Item, GildedRose; print('Source OK')"

CMD ["/bin/bash"]
