seccomp Profile
A seccomp profile is a Linux kernel filter that limits which system calls a container process can make. Docker applies a default profile that blocks roughly 44 risky syscalls.
What seccomp does
Programs use system calls to ask the kernel to do things such as open files, create sockets, or start processes. seccomp (secure computing mode) lets Docker allow or deny syscalls per container, so a compromised process cannot call dangerous ones like mount, reboot, or kexec_load.
Default behavior
The default profile allows most of the 300 or so Linux syscalls and blocks about 44 that ordinary applications do not need and that could help an escape, such as loading kernel modules or rebooting. Some blocked calls become available if the container is granted a matching capability.
Using profiles
docker run -d payment-api:v3.1.0 # default profiledocker run -d --security-opt seccomp=/etc/docker/custom-seccomp.json payment-api:v3.1.0docker run -d --security-opt seccomp=unconfined payment-api:v3.1.0 # debugging onlyservices: api: security_opt: - seccomp:/etc/docker/custom-seccomp.jsonBuilding a stricter profile
Avoid writing a deny list from guesses. Record the syscalls your container actually uses with tools such as strace, or generate an allow list from a profiling run, then test uncommon paths like crash handlers and shutdown.
Rememberseccomp works with, not instead of, non-root users, dropped capabilities, and read-only filesystems.
Security
seccomp=unconfinedremoves a key protection. Never ship it to production.
Frequently Asked Questions
What does Docker's default seccomp profile block?
Roughly 44 syscalls that typical applications do not need, such as mount, reboot, and kernel module loading, because they can help an attacker escape or damage the host. It allows the rest so common software keeps working.
Why isn't the default stricter?
Many images and runtimes legitimately use a wide range of syscalls, and a very strict default would break a large number of workloads. Strict profiles are best tailored to one application.
How do I create a custom profile safely?
Observe real syscall use through profiling tools, build an allow list, and test rare code paths. Hand-written deny lists often miss cases and break the app in production.