dc5d922
# For more information on this configuration file, see containers-registries.conf(5).
dc5d922
#
dc5d922
# NOTE: RISK OF USING UNQUALIFIED IMAGE NAMES
dc5d922
# We recommend always using fully qualified image names including the registry
dc5d922
# server (full dns name), namespace, image name, and tag
dc5d922
# (e.g., registry.redhat.io/ubi8/ubi:latest). Pulling by digest (i.e.,
dc5d922
# quay.io/repository/name@digest) further eliminates the ambiguity of tags.
dc5d922
# When using short names, there is always an inherent risk that the image being
dc5d922
# pulled could be spoofed. For example, a user wants to pull an image named
dc5d922
# `foobar` from a registry and expects it to come from myregistry.com. If
dc5d922
# myregistry.com is not first in the search list, an attacker could place a
dc5d922
# different `foobar` image at a registry earlier in the search list. The user
dc5d922
# would accidentally pull and run the attacker's image and code rather than the
dc5d922
# intended content. We recommend only adding registries which are completely
dc5d922
# trusted (i.e., registries which don't allow unknown or anonymous users to
dc5d922
# create accounts with arbitrary names). This will prevent an image from being
dc5d922
# spoofed, squatted or otherwise made insecure.  If it is necessary to use one
dc5d922
# of these registries, it should be added at the end of the list.
dc5d922
#
dc5d922
# # An array of host[:port] registries to try when pulling an unqualified image, in order.
e066d16
unqualified-search-registries = ["registry.fedoraproject.org", "registry.access.redhat.com", "docker.io", "quay.io"]
dc5d922
#
dc5d922
# [[registry]]
dc5d922
# # The "prefix" field is used to choose the relevant [[registry]] TOML table;
dc5d922
# # (only) the TOML table with the longest match for the input image name
dc5d922
# # (taking into account namespace/repo/tag/digest separators) is used.
b114829
# #
c0dc80d
# # The prefix can also be of the form: *.example.com for wildcard subdomain
c0dc80d
# # matching.
dc5d922
# #
dc5d922
# # If the prefix field is missing, it defaults to be the same as the "location" field.
dc5d922
# prefix = "example.com/foo"
dc5d922
#
dc5d922
# # If true, unencrypted HTTP as well as TLS connections with untrusted
dc5d922
# # certificates are allowed.
dc5d922
# insecure = false
dc5d922
#
dc5d922
# # If true, pulling images with matching names is forbidden.
dc5d922
# blocked = false
dc5d922
#
dc5d922
# # The physical location of the "prefix"-rooted namespace.
dc5d922
# #
c0dc80d
# # By default, this is equal to "prefix" (in which case "prefix" can be omitted
dc5d922
# # and the [[registry]] TOML table can only specify "location").
dc5d922
# #
dc5d922
# # Example: Given
dc5d922
# #   prefix = "example.com/foo"
b114829
# #   location = "internal-registry-for-example.com/bar"
dc5d922
# # requests for the image example.com/foo/myimage:latest will actually work with the
b114829
# # internal-registry-for-example.com/bar/myimage:latest image.
c0dc80d
#
b114829
# # The location can be empty if prefix is in a
c0dc80d
# # wildcarded format: "*.example.com". In this case, the input reference will
c0dc80d
# # be used as-is without any rewrite.
dc5d922
# location = internal-registry-for-example.com/bar"
dc5d922
#
dc5d922
# # (Possibly-partial) mirrors for the "prefix"-rooted namespace.
dc5d922
# #
dc5d922
# # The mirrors are attempted in the specified order; the first one that can be
dc5d922
# # contacted and contains the image will be used (and if none of the mirrors contains the image,
dc5d922
# # the primary location specified by the "registry.location" field, or using the unmodified
dc5d922
# # user-specified reference, is tried last).
dc5d922
# #
dc5d922
# # Each TOML table in the "mirror" array can contain the following fields, with the same semantics
dc5d922
# # as if specified in the [[registry]] TOML table directly:
dc5d922
# # - location
dc5d922
# # - insecure
dc5d922
# [[registry.mirror]]
dc5d922
# location = "example-mirror-0.local/mirror-for-foo"
dc5d922
# [[registry.mirror]]
dc5d922
# location = "example-mirror-1.local/mirrors/foo"
dc5d922
# insecure = true
dc5d922
# # Given the above, a pull of example.com/foo/image:latest will try:
dc5d922
# # 1. example-mirror-0.local/mirror-for-foo/image:latest
dc5d922
# # 2. example-mirror-1.local/mirrors/foo/image:latest
b114829
# # 3. internal-registry-for-example.com/bar/image:latest
dc5d922
# # in order, and use the first one that exists.
9a27ad5
9a27ad5
short-name-mode="enforcing"