docker compose ps # status and health
docker compose logs -f netlens # logs (scan errors also appear in the UI under "Scans & events")
docker compose pull && docker compose up -d # update to the newest published image
docker compose down # stop and remove the container (the data volume is kept)
Do not use --no-new-privileges or remove the NET_RAW/NET_ADMIN capabilities: nmap runs as a non-root user and relies on file capabilities for raw sockets.
Netlens watches itself
The health check of the container reports unwell (HTTP 503) when the database cannot be opened or 90% of the open files are in use. After two minutes of that the process ends, so the container restarts by itself. The limit of open files is raised at start, and from half full onward the log says what the open files are, to find a leak.