Join our Discord Server

Docker Content Trust Cheatsheet

← All cheatsheets
SecurityIntermediate

Docker Content Trust Cheatsheet

Sign and verify images with Notary. Enforce image integrity across your supply chain.


What it is

Docker Content Trust (DCT) uses The Update Framework (TUF) and Notary to sign container images, guaranteeing that only verified images are pulled and run in your environment.

Quick start

export DOCKER_CONTENT_TRUST=1

Enable content trust for all docker commands.

docker trust sign myuser/myapp:1.0

Sign an image with your key.

docker trust inspect --pretty myuser/myapp:1.0

View signing information for an image.

Common commands

TaskCommandDescription
Enable DCTexport DOCKER_CONTENT_TRUST=1Enforce signing for all docker CLI operations.
Sign imagedocker trust sign <image>:<tag>Sign an image tag with your delegation key.
Inspect trustdocker trust inspect --pretty <image>Show signers, keys, and signed tags.
Add signerdocker trust signer add --key cert.pem <signer> <repo>Authorize a new signer for a repository.
Revoke tagdocker trust revoke <image>:<tag>Remove the signature from a tag.

Real-world examples

Sign and push with DCT enabled
export DOCKER_CONTENT_TRUST=1
docker build -t myuser/myapp:1.0 .
docker push myuser/myapp:1.0  # Signs automatically

Best practices

  • Set DOCKER_CONTENT_TRUST=1 in CI/CD pipelines to enforce signed images.
  • Store delegation keys securely — losing them means you cannot sign new tags.
  • Use DCT alongside Docker Scout for full supply-chain security.

Related cheatsheets


Last reviewed: 2026-06-15
Join our Discord Server