容器注册表的自定义 TLS 配置可通过在 $HOME/.config/containers/certs.d 或 /etc/containers/certs.d 下创建目录实现。该目录名称必须与注册表的主机名:端口号对应(例如 my-registry.com:5000)。
一个证书目录可以包含一个或多个具有以下扩展名的文件:
*.crt 具有此扩展名的文件将被解析为CA证书
*.cert 具有此扩展名的文件将被解析为客户端证书
*.key 具有此扩展名的文件将被解析为客户端密钥
请注意,客户端证书-密钥对将通过文件名来选择(例如,client.{cert,key})。在 my-registry.com:5000 上运行的注册表的示例设置如下:
/etc/containers/certs.d/ <- Certificate directory └── my-registry.com:5000 <- Hostname:port ├── client.cert <- Client certificate ├── client.key <- Client key └── ca.crt <- Certificate authority that signed the registry certificate
2019年2月,最初由瓦伦丁·罗斯伯格编纂 rothberg@redhat.com
原文地址:https://github.com/containers/image/blob/main/docs/containers-certs.d.5.md