domains / families / security / container-hardening

container-hardening

combined

Secure Docker images and container runtime configurations. Implement non-root users, read-only filesystems, and security contexts. Use when building secure container images or hardening container deployments. Secure Docker images and container runtime configurations.

When to use

When not to use

Skill page

Conflict

The second copy is a direct adaptation of the first, but it changes the procedure in ways that conflict with the original rather than merely shortening it. The original Dockerfile installs and then removes build dependencies and adds NET_BIND_SERVICE at runtime; the adapted copy removes the build-dependency step entirely (and explicitly warns against it), drops NET_BIND_SERVICE, pins digests, and adds resource limits and tmpfs flags. Because the copies disagree on concrete steps, crowning one would hide a real alternative.