FROM jupyterhub/jupyterhub:4.1

# Install required Python packages and Docker CLI for pre-spawn syncing
RUN pip install --no-cache-dir oauthenticator dockerspawner jupyterhub-idle-culler && \
    apt-get update && \
    apt-get install -y --no-install-recommends docker.io && \
    apt-get clean && rm -rf /var/lib/apt/lists/*

COPY jupyterhub_config.py /srv/jupyterhub/jupyterhub_config.py
