Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Docker Container Security: Image Hardening, Runtime & CI/CD
New

Docker Container Security: Image Hardening, Runtime & CI/CD

DevSecOps for Docker: harden images, scan with Trivy and Grype, sign with Cosign, secure runtime and gate CI/CD releases
Last updated 11/2026
English

What you'll learn

  • Explain how images, layers, namespaces, cgroups and the shared kernel shape container security risk
  • Build smaller, non-root Docker images on pinned, trusted base images with multi-stage builds
  • Scan images with Trivy and Grype and prioritize fixes with CVSS, EPSS, CISA KEV and reachability
  • Record not-affected decisions as VEX statements and manage exceptions with owners and expiry dates
  • Find secrets baked into image layers and history, and build with BuildKit secret mounts instead
  • Deliver runtime secrets as files and rotate leaked credentials with proof the old ones no longer work
  • Harden containers with dropped capabilities, read-only filesystems, resource limits and seccomp
  • Close exposed ports, segment container networks and remove the Docker socket from app containers
  • Generate SBOMs, attach provenance, and sign and verify images by digest with Cosign
  • Build a CI/CD release gate that blocks bad changes, handles exceptions and keeps signed evidence
  • Detect drift, contain a compromised container without destroying evidence, and recover safely
  • Apply Kubernetes securityContext, Pod Security Standards and admission policies to the same workload

Course content

10 sections • 56 lectures • 5h 40m total length
  • Welcome: From "It Runs" to "Safe to Ship"8:01

    Meet Orrin Billing, a fictional invoicing company whose customer wants evidence that its Docker containers are secure. See the container release path (build, scan, configure, run, sign, gate, watch) that this Docker security course follows, and what you will produce: a hardened image, a CI/CD release gate and a release evidence pack. All course resources are in this lecture.

  • Getting Started With the Lab6:36

    Set up the Orrin lab kit on Docker Desktop or Podman Desktop, run the deliberately weak Flask API and Postgres stack with Docker Compose, and confirm it works. Every security tool in the course runs as a pinned container, so there are no cloud costs or local installs.

  • Docker Images, Layers & Registries: What You Actually Ship7:34

    Learn how a container image is built from layers, why deleted files and secrets stay in image history, and how tags differ from immutable digests. Inspect the Orrin image with docker history and see what a registry really stores and serves.

  • Namespaces, cgroups & the Shared Kernel6:39

    Understand the Linux namespaces and cgroups that isolate containers, and why every container shares the host kernel. See which isolation boundaries matter for container security and how resource limits relate to denial of service.

  • Containers vs Virtual Machines: Where the Boundary Really Is6:08

    Compare container isolation with virtual machine isolation, and learn where the security boundary actually sits. Understand container escape risk, why a container is not a VM, and when stronger isolation is worth it.

  • Mapping the Orrin Stack's Attack Paths7:42

    Threat model the weak Orrin stack: privileged containers, the Docker socket, baked-in secrets and exposed database ports. Build an attack-path map that the rest of the course closes, one Docker hardening control at a time.

Requirements

  • Everyday Docker experience: building images, running containers and using Docker Compose
  • Basic Linux and command-line skills
  • A computer that can run Docker Desktop (Windows, Mac or Linux) or Podman Desktop for the hands-on labs. No cloud account needed
  • No prior security background required; security and kernel terms are explained when they first come up

Description

This course contains the use of artificial intelligence.

Learn Docker container security and DevSecOps the way security reviews expect it. Most container images pass their tests and still ship with problems: a root user, a baked-in API key, a privileged flag, a database port open to the world, and a release process nobody could prove. Then a customer's security review asks for evidence, and "it runs, and the tests pass" isn't an answer. This course takes you from that point to a hardened, signed, tested release, with the evidence to back every decision.

Learn by securing one real application

You'll follow Orrin Billing, a fictional invoicing company whose biggest customer wants proof that its containers are secure before renewing. Orrin's invoice API (Python and Flask) and its Postgres database start out deliberately weak. Section by section, you'll fix them on your own computer, and every result you see on screen comes from real runs, not mockups.

All labs run locally on Docker Desktop (or Podman Desktop). Every security tool runs as a pinned container, so there's nothing else to install and no cloud account to pay for.

What you'll cover

  • Container architecture and threat boundaries: images, layers, registries, namespaces, cgroups, the shared kernel, and an attack-path map

  • Secure image construction: trusted and pinned base images, distroless and multi-stage builds, non-root users, hadolint and .dockerignore

  • Vulnerability assessment with Trivy and Grype: CVSS, EPSS, CISA KEV, reachability, VEX statements and exceptions that expire

  • Secrets: finding secrets baked into layers, BuildKit secret mounts, runtime secret files, and rotating leaked credentials

  • Runtime hardening: Linux capabilities, read-only filesystems, resource limits, no-new-privileges, seccomp, AppArmor, SELinux and rootless mode

  • Network and admin access: published ports, network segmentation, the Docker socket, and registry permissions

  • Supply-chain integrity: SBOMs, provenance and SLSA, Cosign signing and verification, and why signed doesn't mean safe

  • CI/CD enforcement: a release gate that blocks or warns, exceptions in the pipeline, pinned tools and retained evidence

  • Monitoring and incident handling: baselines, Docker events, drift detection, evidence-safe containment and recovery

  • Kubernetes extension: securityContext, Pod Security Standards and admission policies with Kyverno

What's included

  • 56 lectures across 10 sections, with a hands-on lab in every section from Section 2 on

  • The Orrin lab kit: the weak starting application, command files for every section, the release gate, policies and tools

  • An exception register template in Excel and PDF

  • A capstone in which you ship the final release through the gate and assemble a signed evidence pack

  • Every resource in the first lecture, ready to download

What makes this course different

  • One application from insecure to hardened, so every control is applied and tested in context

  • Every control is break-tested: you prove the app still works, and you prove the control actually blocks

  • Honest about limits: what scanners miss, what a signature does and doesn't prove, and what a gate can't see

Who this course is for:

  • DevOps, DevSecOps, platform and cloud engineers who build and ship containers
  • Developers who write Dockerfiles and want their images to pass a security review
  • Security analysts and engineers who assess container images, pipelines and runtime configurations
  • Teams that need to show customers or auditors evidence that their containers are secure