# I2P Python Router — Integration Test Container # # Builds a minimal container with our Python I2P implementation # for live network bootstrap testing. FROM python:3.11-slim-bookworm # Install system dependencies (cryptography needs OpenSSL headers) RUN apt-get update && \ apt-get install -y --no-install-recommends \ gcc \ libffi-dev \ libssl-dev \ && rm -rf /var/lib/apt/lists/* # Create app directory WORKDIR /app # Copy source COPY pyproject.toml /app/ COPY src/ /app/src/ COPY tests/integration/ /app/tests/integration/ # Install the package + test dependencies RUN pip install --no-cache-dir -e ".[dev]" # Create data directory for persistent identity + netdb RUN mkdir -p /data/i2p # Environment ENV PYTHONUNBUFFERED=1 ENV I2P_DATA_DIR=/data/i2p ENV I2P_LISTEN_HOST=0.0.0.0 ENV I2P_LISTEN_PORT=9000 # Expose NTCP2 port EXPOSE 9000/tcp # Default: run the integration test CMD ["python", "-m", "tests.integration.network_test"]