liveBook · Manning

Security hardening

As explained in Learn Docker in a Month of Lunches, Second Edition

Security hardening is the practice of reducing exploitable weaknesses by applying restrictive configuration and removing unnecessary capabilities.

Security hardening reduces exploitable weaknesses by restricting configuration and removing unnecessary capabilities. In container workflows, inspect both image contents and deployment artifacts, then balance each fix against application compatibility. section 17.2

A practical hardening workflow includes:

  • Scan Dockerfiles, Kubernetes manifests, Helm charts, and infrastructure-as-code files for misconfiguration. section 17.2
  • Prefer non-root containers and read-only filesystems when the application supports them, then verify the change with end-to-end tests. section 17.2

Try it now

Run Trivy against a repository with the misconfiguration scanner and restrict results to high- and critical-severity findings. Investigate each result before changing the deployment configuration.

How Learn Docker in a Month of Lunches, Second Edition covers it

How deep it goes
Works through image and configuration scans, then stops short of automatic fixes by requiring pragmatic review and end-to-end testing.
Examples
Uses Trivy image scans, repository misconfiguration scans, non-root users, and read-only container filesystems.
What it assumes
Assumes basic Docker deployment knowledge while demonstrating vulnerability and misconfiguration scanning through runnable Trivy commands.
What you can do after
Diagnose vulnerabilities and deployment misconfigurations, apply compatible hardening changes, and verify them with end-to-end tests.
How it connects
Connects Docker images, Dockerfiles, Kubernetes manifests, Helm charts, infrastructure as code, SBOMs, and vulnerability scanning.

Also explained in

Compare how 2 books explain security hardening →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn Docker in a Month of Lunches, Second Edition. The section links point to the parts of the book it draws on.