Skip to content

Commit 95c7085

Browse files
committed
Update documenation for OCI distribution 1.0
Signed-off-by: Derek McGowan <[email protected]>
1 parent 25d7f90 commit 95c7085

3 files changed

Lines changed: 34 additions & 9 deletions

File tree

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ your system. See more details in [Checkpoint and Restore](#checkpoint-and-restor
6868

6969
Build requirements for developers are listed in [BUILDING](BUILDING.md).
7070

71+
72+
## Supported Registries
73+
74+
Any registry which is compliant with the [OCI Distribution Specification](https://github.com/opencontainers/distribution-spec)
75+
is supported by containerd.
76+
77+
For configuring registries, see [registry host configuration documentation](docs/hosts.md)
78+
7179
## Features
7280

7381
### Client

docs/hosts.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ Configuring registries will be done by specifying (optionally) a `hosts.toml` fi
55
each desired registry host in a configuration directory. **Note**: Updates under this directory
66
do not require restarting the containerd daemon.
77

8+
## Registry API Support
9+
10+
All configured registry hosts are expected to comply with the [OCI Distribution Specification](https://github.com/opencontainers/distribution-spec).
11+
Registries which are non-compliant or implement non-standard behavior are not guaranteed
12+
to be supported and may break unexpectedly between releases.
13+
14+
Currently supported OCI Distribution version: **[v1.0.0](https://github.com/opencontainers/distribution-spec/tree/v1.0.0)**
15+
816
## Specifying the Configuration Directory
917

1018
### Using Host Namespace Configs with CTR
@@ -235,8 +243,10 @@ client = [["/etc/certs/client.cert", "/etc/certs/client.key"],["/etc/certs/clien
235243

236244
## skip_verify field
237245

238-
`skip_verify` set this flag to `true` to skip the registry certificate
239-
verification for this registry host namespace. (Defaults to `false`)
246+
`skip_verify` skips verifications of the registry's certificate chain and
247+
host name when set to `true`. This should only be used for testing or in
248+
combination with other method of verifying connections. (Defaults to `false`)
249+
240250
```
241251
skip_verify = false
242252
```

remotes/docker/config/hosts.go

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ type hostConfig struct {
5454

5555
header http.Header
5656

57-
// TODO: API ("docker" or "oci")
58-
// TODO: API Version ("v1", "v2")
5957
// TODO: Add credential configuration (domain alias, username)
6058
}
6159

@@ -283,19 +281,28 @@ type hostFileConfig struct {
283281
// - push
284282
Capabilities []string `toml:"capabilities"`
285283

286-
// CACert can be a string or an array of strings
284+
// CACert are the public key certificates for TLS
285+
// Accepted types
286+
// - string - Single file with certificate(s)
287+
// - []string - Multiple files with certificates
287288
CACert interface{} `toml:"ca"`
288289

289-
// TODO: Make this an array (two key types, one for pairs (multiple files), one for single file?)
290+
// Client keypair(s) for TLS with client authentication
291+
// Accepted types
292+
// - string - Single file with public and private keys
293+
// - []string - Multiple files with public and private keys
294+
// - [][2]string - Muliple keypairs with public and private keys in separate files
290295
Client interface{} `toml:"client"`
291296

297+
// SkipVerify skips verification of the server's certificate chain
298+
// and host name. This should only be used for testing or in
299+
// combination with other methods of verifying connections.
292300
SkipVerify *bool `toml:"skip_verify"`
293301

302+
// Header are additional header files to send to the server
294303
Header map[string]interface{} `toml:"header"`
295304

296-
// API (default: "docker")
297-
// API Version (default: "v2")
298-
// Credentials: helper? name? username? alternate domain? token?
305+
// TODO: Credentials: helper? name? username? alternate domain? token?
299306
}
300307

301308
func parseHostsFile(baseDir string, b []byte) ([]hostConfig, error) {

0 commit comments

Comments
 (0)