Update documenation for OCI distribution 1.0

Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
Derek McGowan 2021-07-01 17:24:08 -07:00
parent 25d7f907c0
commit 95c708572f
No known key found for this signature in database
GPG Key ID: F58C5D0A4405ACDB
3 changed files with 34 additions and 9 deletions

View File

@ -68,6 +68,14 @@ your system. See more details in [Checkpoint and Restore](#checkpoint-and-restor
Build requirements for developers are listed in [BUILDING](BUILDING.md). Build requirements for developers are listed in [BUILDING](BUILDING.md).
## Supported Registries
Any registry which is compliant with the [OCI Distribution Specification](https://github.com/opencontainers/distribution-spec)
is supported by containerd.
For configuring registries, see [registry host configuration documentation](docs/hosts.md)
## Features ## Features
### Client ### Client

View File

@ -5,6 +5,14 @@ Configuring registries will be done by specifying (optionally) a `hosts.toml` fi
each desired registry host in a configuration directory. **Note**: Updates under this directory each desired registry host in a configuration directory. **Note**: Updates under this directory
do not require restarting the containerd daemon. do not require restarting the containerd daemon.
## Registry API Support
All configured registry hosts are expected to comply with the [OCI Distribution Specification](https://github.com/opencontainers/distribution-spec).
Registries which are non-compliant or implement non-standard behavior are not guaranteed
to be supported and may break unexpectedly between releases.
Currently supported OCI Distribution version: **[v1.0.0](https://github.com/opencontainers/distribution-spec/tree/v1.0.0)**
## Specifying the Configuration Directory ## Specifying the Configuration Directory
### Using Host Namespace Configs with CTR ### Using Host Namespace Configs with CTR
@ -235,8 +243,10 @@ client = [["/etc/certs/client.cert", "/etc/certs/client.key"],["/etc/certs/clien
## skip_verify field ## skip_verify field
`skip_verify` set this flag to `true` to skip the registry certificate `skip_verify` skips verifications of the registry's certificate chain and
verification for this registry host namespace. (Defaults to `false`) host name when set to `true`. This should only be used for testing or in
combination with other method of verifying connections. (Defaults to `false`)
``` ```
skip_verify = false skip_verify = false
``` ```

View File

@ -54,8 +54,6 @@ type hostConfig struct {
header http.Header header http.Header
// TODO: API ("docker" or "oci")
// TODO: API Version ("v1", "v2")
// TODO: Add credential configuration (domain alias, username) // TODO: Add credential configuration (domain alias, username)
} }
@ -283,19 +281,28 @@ type hostFileConfig struct {
// - push // - push
Capabilities []string `toml:"capabilities"` Capabilities []string `toml:"capabilities"`
// CACert can be a string or an array of strings // CACert are the public key certificates for TLS
// Accepted types
// - string - Single file with certificate(s)
// - []string - Multiple files with certificates
CACert interface{} `toml:"ca"` CACert interface{} `toml:"ca"`
// TODO: Make this an array (two key types, one for pairs (multiple files), one for single file?) // Client keypair(s) for TLS with client authentication
// Accepted types
// - string - Single file with public and private keys
// - []string - Multiple files with public and private keys
// - [][2]string - Muliple keypairs with public and private keys in separate files
Client interface{} `toml:"client"` Client interface{} `toml:"client"`
// SkipVerify skips verification of the server's certificate chain
// and host name. This should only be used for testing or in
// combination with other methods of verifying connections.
SkipVerify *bool `toml:"skip_verify"` SkipVerify *bool `toml:"skip_verify"`
// Header are additional header files to send to the server
Header map[string]interface{} `toml:"header"` Header map[string]interface{} `toml:"header"`
// API (default: "docker") // TODO: Credentials: helper? name? username? alternate domain? token?
// API Version (default: "v2")
// Credentials: helper? name? username? alternate domain? token?
} }
func parseHostsFile(baseDir string, b []byte) ([]hostConfig, error) { func parseHostsFile(baseDir string, b []byte) ([]hostConfig, error) {