Advanced Containers & Virtualization #container-security#non-root#capabilities#seccomp

Container Security Language

5 exercises — Master the English vocabulary of container hardening: non-root users, Linux capabilities, CVE scanning, seccomp, and read-only filesystems.

0 / 5 completed
Quick reference: Container security vocabulary
  • Non-root — USER instruction sets UID > 0; limits blast radius of application compromise
  • --cap-drop ALL --cap-add X — remove all Linux capabilities, grant back only what's needed
  • Seccomp — system call filter; blocks dangerous kernel syscalls not needed by the app
  • CVE remediation — update base image → rebuild → rescan → document
  • --read-only + tmpfs — immutable root filesystem prevents persistence; tmpfs for runtime writes
1 / 5

A security audit finding reads: "Container web-api runs as root (UID 0). This violates our container hardening policy. Update the Dockerfile to switch to a non-root user before the entrypoint."

Why is running a container process as root (UID 0) a security risk?