perf within container

Back

By default Docker uses seccomp to prevent some calls being run inside a container.

perf requires perf_event_open to be made to collect profiling information.

docker run --rm -it --security-opt=seccomp.perf.json
//seccomp.perf.json
{
  "defaultAction": ...,
  "archMap": [...],
  "syscalls": [
  ...,
  "perf_event_open",
  ....
  ],
  ...
}

Reference