FROM python:3.11-slim # Install net-snmp daemon RUN apt-get update && apt-get install -y --no-install-recommends \ snmpd \ && rm -rf /var/lib/apt/lists/* WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY . . RUN chmod +x /app/snmp/pass_persist.py /app/entrypoint.sh # Persistent data lives here (mount a volume to this path) VOLUME ["/data"] EXPOSE 161/udp EXPOSE 8080 ENTRYPOINT ["/app/entrypoint.sh"]