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