Skip to content

Commit

Permalink
Merge pull request #2069 from fschwa/patch-1
Browse files Browse the repository at this point in the history
Use consistent example domains
  • Loading branch information
vrothberg committed Aug 3, 2023
2 parents aca0600 + 1c088bc commit 2869e26
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions docs/containers-registries.conf.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,16 @@ internet without having to change `Dockerfile`s, or to add redundancy).
: Accepts the same format as the `prefix` field, and specifies the physical location
of the `prefix`-rooted namespace.

By default, this equal to `prefix` (in which case `prefix` can be omitted and the
By default, this is equal to `prefix` (in which case `prefix` can be omitted and the
`[[registry]]` TOML table can only specify `location`).

Example: Given
```
prefix = "example.com/foo"
location = "internal-registry-for-example.net/bar"
location = "internal-registry-for-example.com/bar"
```
requests for the image `example.com/foo/myimage:latest` will actually work with the
`internal-registry-for-example.net/bar/myimage:latest` image.
`internal-registry-for-example.com/bar/myimage:latest` image.

With a `prefix` containing a wildcard in the format: "*.example.com" for subdomain matching,
the location can be empty. In such a case,
Expand Down Expand Up @@ -248,7 +248,7 @@ Given the above, a pull of `example.com/foo/image:latest` will try:

1. `example-mirror-0.local/mirror-for-foo/image:latest`
2. `example-mirror-1.local/mirrors/foo/image:latest`
3. `internal-registry-for-example.net/bar/image:latest`
3. `internal-registry-for-example.com/bar/image:latest`

in order, and use the first one that exists.

Expand Down
10 changes: 5 additions & 5 deletions registries.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# # The "prefix" field is used to choose the relevant [[registry]] TOML table;
# # (only) the TOML table with the longest match for the input image name
# # (taking into account namespace/repo/tag/digest separators) is used.
# #
# #
# # The prefix can also be of the form: *.example.com for wildcard subdomain
# # matching.
# #
Expand All @@ -45,11 +45,11 @@
# #
# # Example: Given
# # prefix = "example.com/foo"
# # location = "internal-registry-for-example.net/bar"
# # location = "internal-registry-for-example.com/bar"
# # requests for the image example.com/foo/myimage:latest will actually work with the
# # internal-registry-for-example.net/bar/myimage:latest image.
# # internal-registry-for-example.com/bar/myimage:latest image.
#
# # The location can be empty iff prefix is in a
# # The location can be empty if prefix is in a
# # wildcarded format: "*.example.com". In this case, the input reference will
# # be used as-is without any rewrite.
# location = internal-registry-for-example.com/bar"
Expand All @@ -73,5 +73,5 @@
# # Given the above, a pull of example.com/foo/image:latest will try:
# # 1. example-mirror-0.local/mirror-for-foo/image:latest
# # 2. example-mirror-1.local/mirrors/foo/image:latest
# # 3. internal-registry-for-example.net/bar/image:latest
# # 3. internal-registry-for-example.com/bar/image:latest
# # in order, and use the first one that exists.

0 comments on commit 2869e26

Please sign in to comment.