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