From 0140f782fe0ed12bec6d6ed1a3e6ee3c08f7e4ac Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Thu, 21 Apr 2022 10:25:58 +0200 Subject: [PATCH] man containers-registries.conf: clarify mirror association Clarify that a `[[registry.mirror]]` is associated only with the previous `[[registry]]`. Fixes: #1523 Signed-off-by: Valentin Rothberg --- docs/containers-registries.conf.5.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/containers-registries.conf.5.md b/docs/containers-registries.conf.5.md index 75d639c0ec..d28f83566d 100644 --- a/docs/containers-registries.conf.5.md +++ b/docs/containers-registries.conf.5.md @@ -99,7 +99,7 @@ as-is. But other settings like insecure/blocked/mirrors will be applied to match `mirror` : An array of TOML tables specifying (possibly-partial) mirrors for the -`prefix`-rooted namespace. +`prefix`-rooted namespace (i.e., the previous registry). The mirrors are attempted in the specified order; the first one that can be contacted and contains the image will be used (and if none of the mirrors contains the image, @@ -236,6 +236,12 @@ location = "example-mirror-0.local/mirror-for-foo" [[registry.mirror]] location = "example-mirror-1.local/mirrors/foo" insecure = true + +[[registry]] +location = "registry.com" + +[[registry.mirror]] +location = "mirror.registry.com" ``` Given the above, a pull of `example.com/foo/image:latest` will try: 1. `example-mirror-0.local/mirror-for-foo/image:latest` @@ -244,6 +250,8 @@ Given the above, a pull of `example.com/foo/image:latest` will try: in order, and use the first one that exists. +Note that a mirror is associated only with the previous registry. Pulling `registry.com/image:latest` will hence only reach out to `mirror.registry.com` and not use the one associated to the other registry. + ## VERSION 1 FORMAT - DEPRECATED VERSION 1 format is still supported but it does not support using registry mirrors, longest-prefix matches, or location rewriting.