Files
iperf3-monitor/exporter/Dockerfile
Malar Kannan ec0a16353d feat(exporter): implement subprocess execution with active stall watchdog and TCP metrics (#26)
- Replace in-process iperf3 C binding with subprocess execution
- Add active I/O stall detection and connect-timeout
- Expose TCP retransmissions, mean RTT (ms), and exporter cycle timestamp
- Upgrade Dockerfile to Python 3.12 running as non-root user (nobody)
- Fix testTimeout/testDuration environment variable mapping in Helm chart
- Remove dead TrueCharts prometheus-operator chart dependency
- Add unit tests for exporter metric parsing and stall handling
- Switch tooling from devbox to mise

Co-authored-by: Malarbase <malarbase@gmail.com>
2026-09-26 10:08:28 +05:30

35 lines
709 B
Docker

# Stage 1: Build stage with dependencies
FROM python:3.12-slim AS builder
WORKDIR /app
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir --prefix=/install -r requirements.txt
# Stage 2: Final runtime stage
FROM python:3.12-slim
WORKDIR /app
# Install iperf3
RUN apt-get update && \
apt-get install -y --no-install-recommends iperf3 && \
rm -rf /var/lib/apt/lists/*
# Copy installed Python packages from the builder stage
COPY --from=builder /install /usr/local
# Copy the exporter application code
COPY exporter.py .
# Expose the metrics port
EXPOSE 9876
# Run as non-root user (nobody)
USER 65534:65534
# Set the entrypoint
CMD ["python", "exporter.py"]