Skip to content

Commit 8b5f4e1

Browse files
dhi: update mirror example
Signed-off-by: Craig <craig.osterhout@docker.com>
1 parent b67e13f commit 8b5f4e1

1 file changed

Lines changed: 7 additions & 18 deletions

File tree

content/manuals/dhi/how-to/mirror.md

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -181,32 +181,21 @@ attestations using `regctl`. You must [install
181181
$ regctl registry login "$DEST_REG
182182
```
183183

184-
3. Mirror the image by digest from Docker Hub to your destination registry.
185-
186-
First, get a digest for a specific tag and platform. For example, `linux/amd64`.
184+
3. Get a digest for a specific tag and platform. For example, `linux/amd64`.
187185

188186
```console
189187
DIGEST="$(regctl manifest head "${SRC_REPO}:${SRC_TAG}" --platform linux/amd64)"
190188
```
191189

192-
Then, copy the image by digest to ensure you get the exact same image.
193-
194-
```console
195-
regctl image copy \
196-
"${SRC_REPO}@${DIGEST}" \
197-
"${DEST_REG}/${DEST_REPO}@${DIGEST}"
198-
```
199-
200-
4. Mirror the attestations from the Scout registry to your target registry using
201-
`--referrers` and referrer endpoints:
190+
4. Mirror the image and attestations using `--referrers` and referrer endpoints:
202191

203192
```console
204193
$ regctl image copy \
205-
--referrers \
206-
--referrers-src "registry.scout.docker.com/<your-org>/dhi-python" \
207-
--referrers-tgt "${DEST_REG}/${DEST_REPO}" \
208-
"registry.scout.docker.com/<your-org>/dhi-python@${DIGEST}" \
209-
"${DEST_REG}/${DEST_REPO}@${DIGEST}"
194+
"${SRC_REPO}@${DIGEST}" \
195+
"${DEST_REG}/${DEST_REPO}@${DIGEST}"
196+
--referrers \
197+
--referrers-src "registry.scout.docker.com/<your-org>/dhi-python" \
198+
--referrers-tgt "${DEST_REG}/${DEST_REPO}"
210199
```
211200

212201
5. Verify that artifacts were preserved.

0 commit comments

Comments
 (0)