20884f
# For more information on this configuration file, see containers-registries.conf(5).
20884f
#
20884f
# There are multiple versions of the configuration syntax available, where the
20884f
# second iteration is backwards compatible to the first one. Mixing up both
20884f
# formats will result in an runtime error.
20884f
#
20884f
# The initial configuration format looks like this:
20884f
#
20884f
# NOTE: RISK OF USING UNQUALIFIED IMAGE NAMES
20884f
# Red Hat recommends always using fully qualified image names including the registry server (full dns name),
20884f
# namespace, image name, and tag (ex. registry.redhat.io/ubi8/ubu:latest). When using short names, there is
20884f
# always an inherent risk that the image being pulled could be spoofed. For example, a user wants to.
20884f
# pull an image named `foobar` from a registry and expects it to come from myregistry.com. If myregistry.com
20884f
# is not first in the search list, an attacker could place a different `foobar` image at a registry earlier
20884f
# in the search list. The user would accidentally pull and run the attacker's image and code rather than the
20884f
# intended content. Red Hat recommends only adding registries which are completely trusted, i.e. registries
20884f
# which don't allow unknown or anonymous users to create accounts with arbitrary names. This will prevent
20884f
# an image from being spoofed, squatted or otherwise made insecure.  If it is necessary to use one of these
20884f
# registries, it should be added at the end of the list.
20884f
#
20884f
# It is recommended to use fully-qualified images for pulling as the
20884f
# destination registry is unambiguous. Pulling by digest
20884f
# (i.e., quay.io/repository/name@digest) further eliminates the ambiguity of
20884f
# tags.
20884f
20884f
# The following registries are a set of secure defaults provided by Red Hat.
20884f
# Each of these registries provides container images curated, patched
20884f
# and maintained by Red Hat and its partners
20884f
#[registries.search]
20884f
#registries = ['registry.access.redhat.com', 'registry.redhat.io']
20884f
20884f
# To ensure compatibility with docker we've included docker.io in the default search list. However Red Hat
20884f
# does not curate, patch or maintain container images from the docker.io registry.
20884f
[registries.search]
20884f
registries = ['registry.access.redhat.com', 'registry.redhat.io', 'docker.io']
20884f
20884f
# The following registries entry can be used for convenience but includes
20884f
# container images built by the community. This set of content comes with all
20884f
# of the risks of any user generated content including security and performance
20884f
# issues. To use this list first comment out the default list, then uncomment
20884f
# the following list
20884f
#[registries.search]
20884f
#registries = ['registry.access.redhat.com', 'registry.redhat.io', 'docker.io', 'quay.io']
20884f
20884f
# Registries that do not use TLS when pulling images or uses self-signed
20884f
# certificates.
20884f
[registries.insecure]
20884f
registries = []
20884f
20884f
# Blocked Registries, blocks the `docker daemon` from pulling from the blocked registry.  If you specify
20884f
# "*", then the docker daemon will only be allowed to pull from registries listed above in the search
20884f
# registries.  Blocked Registries is deprecated because other container runtimes and tools will not use it.
20884f
# It is recommended that you use the trust policy file /etc/containers/policy.json to control which
20884f
# registries you want to allow users to pull and push from.  policy.json gives greater flexibility, and
20884f
# supports all container runtimes and tools including the docker daemon, cri-o, buildah ...
20884f
# The atomic CLI `atomic trust` can be used to easily configure the policy.json file.
20884f
[registries.block]
20884f
registries = []
20884f
20884f
# The second version of the configuration format allows to specify registry
20884f
# mirrors:
20884f
#
20884f
# # An array of host[:port] registries to try when pulling an unqualified image, in order.
20884f
unqualified-search-registries = ["registry.fedoraproject.org", "registry.access.redhat.com", "registry.centos.org", "docker.io"]
20884f
#
20884f
# [[registry]]
20884f
# # The "prefix" field is used to choose the relevant [[registry]] TOML table;
20884f
# # (only) the TOML table with the longest match for the input image name
20884f
# # (taking into account namespace/repo/tag/digest separators) is used.
20884f
# #
20884f
# # If the prefix field is missing, it defaults to be the same as the "location" field.
20884f
# prefix = "example.com/foo"
20884f
#
20884f
# # If true, unencrypted HTTP as well as TLS connections with untrusted
20884f
# # certificates are allowed.
20884f
# insecure = false
20884f
#
20884f
# # If true, pulling images with matching names is forbidden.
20884f
# blocked = false
20884f
#
20884f
# # The physical location of the "prefix"-rooted namespace.
20884f
# #
20884f
# # By default, this equal to "prefix" (in which case "prefix" can be omitted
20884f
# # and the [[registry]] TOML table can only specify "location").
20884f
# #
20884f
# # Example: Given
20884f
# #   prefix = "example.com/foo"
20884f
# #   location = "internal-registry-for-example.net/bar"
20884f
# # requests for the image example.com/foo/myimage:latest will actually work with the
20884f
# # internal-registry-for-example.net/bar/myimage:latest image.
20884f
# location = internal-registry-for-example.com/bar"
20884f
#
20884f
# # (Possibly-partial) mirrors for the "prefix"-rooted namespace.
20884f
# #
20884f
# # The mirrors are attempted in the specified order; the first one that can be
20884f
# # contacted and contains the image will be used (and if none of the mirrors contains the image,
20884f
# # the primary location specified by the "registry.location" field, or using the unmodified
20884f
# # user-specified reference, is tried last).
20884f
# #
20884f
# # Each TOML table in the "mirror" array can contain the following fields, with the same semantics
20884f
# # as if specified in the [[registry]] TOML table directly:
20884f
# # - location
20884f
# # - insecure
20884f
# [[registry.mirror]]
20884f
# location = "example-mirror-0.local/mirror-for-foo"
20884f
# [[registry.mirror]]
20884f
# location = "example-mirror-1.local/mirrors/foo"
20884f
# insecure = true
20884f
# # Given the above, a pull of example.com/foo/image:latest will try:
20884f
# # 1. example-mirror-0.local/mirror-for-foo/image:latest
20884f
# # 2. example-mirror-1.local/mirrors/foo/image:latest
20884f
# # 3. internal-registry-for-example.net/bar/myimage:latest
20884f
# # in order, and use the first one that exists.