FROM python:3.11-slim # Install system dependencies RUN apt-get update && apt-get install -y \ procps \ findutils \ curl \ && rm -rf /var/lib/apt/lists/* # Set working directory WORKDIR /app # Copy requirements COPY requirements.txt . # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Copy agent code COPY security_agent.py . # Create log directory RUN mkdir -p /var/log && chmod 777 /var/log # Run as non-root user (but needs access to host processes) # Note: Will need --privileged or proper capabilities in docker-compose ENV PYTHONUNBUFFERED=1 CMD ["python", "security_agent.py"]