Skip to content

Commit

Permalink
docs: add containerd private registry configuration (#1073)
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi authored Feb 16, 2022
1 parent 27a3fa9 commit 398b544
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/en/runtime-integration/containerd/mirror.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,24 @@ Containerd will pull images with `http://127.0.0.1:65001` first.
If `http://127.0.0.1:65001` is not available,
the default `https://registry-1.docker.io` will be used for HA.

Enable mirrors in private Containerd registries configuration in

`/etc/containerd/config.toml`:

```toml
# explicitly use v2 config format, if already v2, skip the "version = 2"
version = 2

[plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]
endpoint = ["http://127.0.0.1:65001","https://registry-1.docker.io"]

[plugins."io.containerd.grpc.v1.cri".registry.configs."127.0.0.1:65001".auth]
username = "registry_username"
password = "registry_password"
```

In this config, registry auth configuration needs to be based on `127.0.0.1:65001`.

> More details about Containerd configuration: <https://github.com/containerd/containerd/blob/v1.5.2/docs/cri/registry.md#configure-registry-endpoint>
> Containerd has deprecated the above config from v1.4.0,
new format for reference: <https://github.com/containerd/containerd/blob/v1.5.2/docs/cri/config.md#registry-configuration>
Expand Down

0 comments on commit 398b544

Please sign in to comment.