.nh .TH containers-registries.d 5 Registries.d Man Page Miloslav Trmač August 2016 .SH NAME .PP containers-registries.d - Directory for various registries configurations .SH DESCRIPTION .PP The registries configuration directory contains configuration for various registries (servers storing remote container images), and for content stored in them, so that the configuration does not have to be provided in command-line options over and over for every command, and so that it can be shared by all users of containers/image. .PP By default, the registries configuration directory is \fB$HOME/.config/containers/registries.d\fR if it exists, otherwise \fB/etc/containers/registries.d\fR (unless overridden at compile-time); applications may allow using a different directory instead. .SH Directory Structure .PP The directory may contain any number of files with the extension \fB\&.yaml\fR, each using the YAML format. Other than the mandatory extension, names of the files don’t matter. .PP The contents of these files are merged together; to have a well-defined and easy to understand behavior, there can be only one configuration section describing a single namespace within a registry (in particular there can be at most one one \fBdefault-docker\fR section across all files, and there can be at most one instance of any key under the \fBdocker\fR section; these sections are documented later). .PP Thus, it is forbidden to have two conflicting configurations for a single registry or scope, and it is also forbidden to split a configuration for a single registry or scope across more than one file (even if they are not semantically in conflict). .SH Registries, Scopes and Search Order .PP Each YAML file must contain a “YAML mapping” (key-value pairs). Two top-level keys are defined: .RS .IP \(bu 2 \fBdefault-docker\fR is the \fIconfiguration section\fP (as documented below) for registries implementing "Docker Registry HTTP API V2". .RE .PP This key is optional. .RS .IP \(bu 2 \fBdocker\fR is a mapping, using individual registries implementing "Docker Registry HTTP API V2", or namespaces and individual images within these registries, as keys; the value assigned to any such key is a \fIconfiguration section\fP\&. .RE .PP This key is optional. .PP Scopes matching individual images are named Docker references \fIin the fully expanded form\fP, either using a tag or digest. For example, \fBdocker.io/library/busybox:latest\fR (\fInot\fP \fBbusybox:latest\fR). .PP More general scopes are prefixes of individual-image scopes, and specify a repository (by omitting the tag or digest), a repository namespace, or a registry host (and a port if it differs from the default). .PP Note that if a registry is accessed using a hostname+port configuration, the port-less hostname is \fInot\fP used as parent scope. .PP When searching for a configuration to apply for an individual container image, only the configuration for the most-precisely matching scope is used; configuration using more general scopes is ignored. For example, if \fIany\fP configuration exists for \fBdocker.io/library/busybox\fR, the configuration for \fBdocker.io\fR is ignored (even if some element of the configuration is defined for \fBdocker.io\fR and not for \fBdocker.io/library/busybox\fR). .SS Built-in Defaults .PP If no \fBdocker\fR section can be found for the container image, and no \fBdefault-docker\fR section is configured: .RS .IP \(bu 2 The default directory, \fB/var/lib/containers/sigstore\fR for root and \fB$HOME/.local/share/containers/sigstore\fR for unprivileged user, will be used for reading and writing signatures. .IP \(bu 2 Sigstore attachments will not be read/written. .RE .SH Individual Configuration Sections .PP A single configuration section is selected for a container image using the process described above. The configuration section is a YAML mapping, with the following keys: .RS .IP \(bu 2 \fBlookaside-staging\fR defines an URL of of the signature storage, used for editing it (adding or deleting signatures). .RE .PP This key is optional; if it is missing, \fBlookaside\fR below is used. .RS .IP \(bu 2 \fBlookaside\fR defines an URL of the signature storage. This URL is used for reading existing signatures, and if \fBlookaside-staging\fR does not exist, also for adding or removing them. .RE .PP This key is optional; if it is missing, no signature storage is defined (no signatures are download along with images, adding new signatures is possible only if \fBlookaside-staging\fR is defined). .RS .IP \(bu 2 \fBuse-sigstore-attachments\fR specifies whether sigstore image attachments (signatures, attestations and the like) are going to be read/written along with the image. If disabled, the images are treated as if no attachments exist; attempts to write attachments fail. .RE .SH Examples .SS Using Containers from Various Origins .PP The following demonstrates how to to consume and run images from various registries and namespaces: .EX docker: registry.database-supplier.com: lookaside: https://lookaside.database-supplier.com distribution.great-middleware.org: lookaside: https://security-team.great-middleware.org/lookaside docker.io/web-framework: lookaside: https://lookaside.web-framework.io:8080 .EE .SS Developing and Signing Containers, Staging Signatures .PP For developers in \fBexample.com\fR: .RS .IP \(bu 2 Consume most container images using the public servers also used by clients. .IP \(bu 2 Use a separate signature storage for an container images in a namespace corresponding to the developers' department, with a staging storage used before publishing signatures. .IP \(bu 2 Craft an individual exception for a single branch a specific developer is working on locally. .RE .EX docker: registry.example.com: lookaside: https://registry-lookaside.example.com registry.example.com/mydepartment: lookaside: https://lookaside.mydepartment.example.com lookaside-staging: file:///mnt/mydepartment/lookaside-staging registry.example.com/mydepartment/myproject:mybranch: lookaside: http://localhost:4242/lookaside lookaside-staging: file:///home/useraccount/webroot/lookaside .EE .SS A Global Default .PP If a company publishes its products using a different domain, and different registry hostname for each of them, it is still possible to use a single signature storage server without listing each domain individually. This is expected to rarely happen, usually only for staging new signatures. .EX default-docker: lookaside-staging: file:///mnt/company/common-lookaside-staging .EE .SH AUTHORS .PP Miloslav Trmač mitr@redhat.com \[la]mailto:mitr@redhat.com\[ra]