@@ -129,50 +129,46 @@ namespace on Docker Hub, you can optionally mirror it to another container
129129registry, such as Amazon ECR, Google Artifact Registry, GitHub Container
130130Registry, or a private Harbor instance.
131131
132- You can use any standard workflow, including:
132+ You can use any standard workflow to mirror the image, such as the
133+ [ Docker CLI] ( /reference/cli/docker/_index.md ) , [ Docker Hub Registry
134+ API] ( /reference/api/registry/latest/ ) , third-party registry tools, or CI/CD
135+ automation.
133136
134- - [ The Docker CLI] ( /reference/cli/docker/_index.md )
135- - [ The Docker Hub Registry API] ( /reference/api/registry/latest/ )
136- - Third-party registry tools or CI/CD automation
137+ However, to preserve the full security context, including signatures and
138+ attestations, you must also copy its associated OCI artifacts. Docker
139+ Hardened Images store the image layers on Docker Hub (` docker.io ` ) and the
140+ signed attestations in a separate registry (` registry.scout.docker.com ` ).
137141
138- The following example shows how to use the Docker CLI to pull a mirrored DHI and
139- push it to another registry:
142+ To copy both, you can use [ regctl] ( https://regclient.org/cli/regctl/ ) , an
143+ OCI-aware CLI that supports mirroring images along with attached artifacts such
144+ as SBOMs, vulnerability reports, and SLSA provenance.
140145
141- ``` console
142- # Authenticate to Docker Hub (if not already signed in)
143- $ docker login
144-
145- # Pull the image from your organization' s namespace on Docker Hub
146- $ docker pull < your-namespace> /dhi-< image> :< tag>
147-
148- # Tag the image for your destination registry
149- $ docker tag < your-namespace> /dhi-< image> :< tag> registry.example.com/my-project/< image> :< tag>
146+ The following example uses ` regctl ` to mirror a DHI and then its attestations to a
147+ private registry:
150148
151- # Push the image to the destination registry
152- # You will need to authenticate to the third-party registry before pushing
153- $ docker push registry.example.com/my-project/< image> :< tag>
149+ ``` console
150+ $ regctl \
151+ --host "reg=docker.io,user=$DOCKER_USERNAME,pass=$DOCKER_PASSWORD_OR_PAT" \
152+ --host "reg=registry.example.com" \
153+ image copy \
154+ docker.io/docs/dhi-python@sha256:25c9... \
155+ my-registry.example.com/mirror/dhi-python@sha256:25c9...
156+
157+ $ regctl \
158+ --host "reg=registry.scout.docker.com,user=$DOCKER_USERNAME,pass=$DOCKER_PASSWORD_OR_PAT" \
159+ --host "reg=registry.example.com" \
160+ image copy --referrers \
161+ registry.scout.docker.com/docs/dhi-python@sha256:25c9... \
162+ my-registry.example.com/mirror/dhi-python@sha256:25c9...
154163```
155164
165+ This mirrors both the image and its associated attestations to a private OCI-compatible registry.
166+
156167> [ !IMPORTANT]
157168>
158169> To continue receiving image updates and preserve access to Docker Hardened
159170> Images, ensure that any copies pushed to other registries remain private.
160171
161- ### Include attestations when mirroring images
162-
163- Docker Hardened Images are signed and include associated attestations that
164- provide metadata such as build provenance and vulnerability scan results. These
165- attestations are stored as OCI artifacts and are not included by default when
166- using the Docker CLI to mirror images.
167-
168- To preserve the full security context when copying DHIs to another registry, you
169- must explicitly include the attestations. One tool is ` regctl ` , which supports
170- copying both images and their associated artifacts.
171-
172- For more details on how to use ` regctl ` to copy images and their associated
173- artifacts, see the [ regclient
174- documentation] ( https://regclient.org/cli/regctl/image/copy/ ) .
175-
176172## What's next
177173
178174After mirroring an image repository, you can you can start [ using the
0 commit comments