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