ARG AWS_ACCOUNT=086679231553
FROM ${AWS_ACCOUNT}.dkr.ecr.us-east-1.amazonaws.com/docker-parent-images:python313

USER root

# System dependencies
RUN apt-get update -y \
    && apt-get install -y --no-install-recommends \
       gcc \
       default-libmysqlclient-dev \
       pkg-config \
    && apt-get clean all \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /tests

# Install Python dependencies first for better layer caching
COPY requirements.txt ./
RUN pip install --upgrade pip \
    && pip install --no-cache-dir -r requirements.txt

# Copy the rest of the test suite
COPY . .

# Ensure script is executable
RUN chmod +x step-function-tests.sh

# Default command
CMD ["./step-function-tests.sh"]
