FROM python:3.10-slim-bullseye

# Update and install basic utilities and dependencies
RUN apt-get update -y \
    && apt-get -y upgrade --fix-missing \
    && apt-get -y install git procps coreutils \
                          build-essential \
                          gcc \
                          python3-dev \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /workspace

# Install PROPKA with dependencies 
RUN pip install --no-cache-dir numpy pytest \
    && pip install --no-cache-dir propka

# Make propka3 available in PATH (should already be in path from pip install)
ENV PATH="/usr/local/bin:${PATH}"

# Test that the installation worked
RUN propka3 --help
