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