FROM python:3.12-slim

RUN apt-get update && apt-get install -y --no-install-recommends \
    curl git openssh-client \
    && curl -fsSL https://download.docker.com/linux/static/stable/x86_64/docker-27.3.1.tgz \
    | tar -xz --strip-components=1 -C /usr/local/bin docker/docker \
    && apt-get clean && rm -rf /var/lib/apt/lists/*

WORKDIR /collection

COPY test-requirements.txt .

RUN python -m pip install --upgrade pip \
    && pip install -r test-requirements.txt

COPY . .

ENV ANSIBLE_COLLECTIONS_PATH=/collection/..
ENV ANSIBLE_ROLES_PATH=/collection/roles

#CMD ["python", "-m", "pytest", "tests/unit/", "-v"]