# Optional: OS fingerprinting for the network scanner. Off by default.
#
# Telling what operating system a device runs, by how its network stack answers, means sending raw
# packets, which needs the Linux NET_RAW capability. The app's container deliberately has none: it
# runs as a non-root user with every capability dropped and no-new-privileges set. Layering this
# file gives the app container that one capability, and lifts no-new-privileges, which a file
# capability needs in order to take effect. Everything else stays as it is: still non-root, still a
# read-only filesystem, still no other capability. Only private IPv4 addresses are ever fingerprinted.
#
# Turn it on by adding this file to COMPOSE_FILE in .env, then recreating the app:
#
#   COMPOSE_FILE=docker-compose.yml:docker-compose.fingerprint.yml
#   docker compose up -d
#
# (Or: docker compose -f docker-compose.yml -f docker-compose.fingerprint.yml up -d.)
# Turn it off again by removing it from COMPOSE_FILE. The Scan network dialog then offers it.
services:
  app:
    cap_add: [NET_RAW]
    security_opt: !override
      - no-new-privileges:false
