Customize seccomp for an app that needs one blocked syscall.
AdvancedScenarioSecurity and scanning
Answer
Situation read → Docker's default profile blocks about 50 syscalls (e.g., ptrace on older kernels, mount, keyctl).
What I'd do →
- Save the default profile, add only the required syscall to the allow list.
docker run --security-opt seccomp=./profile.json app.- Find needed calls with
strace -c -fordocker run --security-opt seccomp=unconfinedonly in a test.
Why → A tailored profile is safer than unconfined.
Interview tip → Never ship seccomp=unconfined.
More on Security and scanning
A scan reports 300 CVEs in your base image. How do you triage?IntermediateAdd vulnerability scanning to CI so critical findings block the merge.BeginnerWhy is mounting `/var/run/docker.sock` into a container dangerous?IntermediateA developer asks for `--privileged`. What do you do?IntermediateHarden a container run command for a stateless web API.IntermediateA pentester got root inside a container. How bad is it?Advanced