Skip to content

Commit

Permalink
man containers-registries.conf: clarify mirror association
Browse files Browse the repository at this point in the history
Clarify that a `[[registry.mirror]]` is associated only with the
previous `[[registry]]`.

Fixes: #1523
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
  • Loading branch information
vrothberg committed Apr 21, 2022
1 parent d2d961d commit 0140f78
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/containers-registries.conf.5.md
Expand Up @@ -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,
Expand Down Expand Up @@ -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`
Expand All @@ -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.
Expand Down

0 comments on commit 0140f78

Please sign in to comment.