Interview Prep/Docker/Security and scanning

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 →

  1. Save the default profile, add only the required syscall to the allow list.
  2. docker run --security-opt seccomp=./profile.json app.
  3. Find needed calls with strace -c -f or docker run --security-opt seccomp=unconfined only in a test.

Why → A tailored profile is safer than unconfined.

Interview tip → Never ship seccomp=unconfined.

All Docker questions Roadmap: Docker & containers

More on Security and scanning