Course contentsShow
← Cloud and Infrastructure
Lesson 1077 of 2,98921. Container RegistriesFree lesson

Content Trust and Notary

Docker Content Trust and Notary v1/v2 for establishing publisher trust and ensuring only signed images are used.

Content Trust and Notary

What you'll learn: How Docker Content Trust and Notary ensure you only run container images from verified publishers you trust.

The Problem: Can You Trust That Image?

You've learned how to sign and verify images, but how do you enforce that policy across your entire infrastructure? What stops someone from accidentally (or maliciously) pulling an unsigned or tampered image?

What is Docker Content Trust?

Docker Content Trust (DCT) is a security feature that uses digital signatures to verify both the publisher of an image and the integrity of its content. When enabled, Docker will refuse to pull or run images that aren't signed by a trusted key.

Think of it like a bouncer at an exclusive club: only images with the right credentials (signatures) get through the door.

Notary: The Trust Infrastructure

Notary is the open-source framework that powers Content Trust. It implements The Update Framework (TUF), a specification designed to protect software distribution systems from various attacks.

Notary maintains a server-side database of signed metadata about your images. When you push an image with DCT enabled, Notary records cryptographic signatures. When you pull, Notary verifies those signatures before Docker proceeds.

Notary v1 vs v2

  • Notary v1: The original implementation, battle-tested but considered legacy
  • Notary v2: Modern redesign focused on OCI standards, improved performance, and simplified architecture

Both versions accomplish the same goal: establishing a chain of trust from publisher to consumer.

Enabling Content Trust

Content Trust is opt-in. You enable it by setting an environment variable before Docker operations, ensuring only signed images are accepted.

Key Takeaway: Docker Content Trust with Notary creates an enforceable policy that guarantees only cryptographically verified images from trusted publishers can be pulled and run, protecting your infrastructure from tampering and unauthorized images.