Skip to main content
In this guide, you’ll learn how to configure Docker Content Trust (DCT) to allow only cryptographically signed images in your environment. We cover:
  • Pulling unsigned images without Content Trust
  • Enabling Content Trust on an individual host
  • Enforcing Content Trust across a UCP cluster
  • Pushing unsigned images to Docker Trusted Registry (DTR)
  • Managing Notary keys and signing images
  • Verifying and pulling signed images

Step 1: Pulling an Unsigned Image (without Content Trust)

On a UCP worker node, list existing images and pull the unsigned image yogeshraheja/tomcatone:v1 from Docker Hub:
By default, Docker allows pulling unsigned images from public registries.

Step 2: Enabling Docker Content Trust on a Single Host

To require signed images, set the DOCKER_CONTENT_TRUST environment variable:
Remove the previously pulled image and attempt to pull it again:
Docker refuses to pull the unsigned image when Content Trust is enabled.

Step 3: Enforcing Content Trust Cluster-Wide via UCP

Manually exporting an environment variable on each node is tedious. Instead, enforce Content Trust across your Docker Universal Control Plane (UCP) cluster:
  1. Log in to UCP as an administrator.
  2. Navigate to Admin SettingsAccount Settings.
  3. Enable Docker Content Trust (Only Signed Images).
  4. Save your changes.
This setting propagates DOCKER_CONTENT_TRUST=1 to all cluster nodes.
The image shows the "Admin Settings" page of Docker Enterprise, specifically focusing on "Docker Content Trust" settings, with an option to run only signed images.

Step 4: Pulling an Unsigned Image from a Client with Content Trust Enabled

On your local workstation using the UCP client bundle, Content Trust is now enforced:
Disabling Content Trust exposes your environment to unsigned and potentially unverified images. Only unset if absolutely necessary.
To continue working with unsigned images temporarily:

Step 5: Pushing the Unsigned Image to Docker Trusted Registry (DTR)

  1. In DTR, create a repository named yogeshraheja/testimagesigning.
  2. Tag and push the image from your local host:
The repository now contains the unsigned image.

Step 6: Signing the Image with Docker Content Trust

Docker Content Trust uses Notary to manage trust metadata. Below are the steps to import your keys, initialize trust for a repository, and sign an image.

6.1 Import Your Notary Private Key

Copy the private key into Docker’s trust directory and load it:

6.2 Initialize Trust Metadata and Add a Signer

Authorize your user as a signer and initialize the repository’s trust data:

6.3 Sign the Image Tag

Sign the v1 tag:
(Optional) Verify trust metadata:

Step 7: Pushing Signed Images and New Tags

After signing, push your v1 image and optionally tag and sign a new version v2:
The image shows a Docker Enterprise Trusted Registry interface displaying details of a repository named "testimagesigning," including a signed image tagged "v2" with its type, ID, size, and vulnerability scan options.

Summary Table of Content Trust Configuration


Watch Video