docker trust key load

描述加载私钥文件用于签名
用法docker trust key load [OPTIONS] KEYFILE

描述

docker trust key load 将私钥添加到本地 Docker trust 密钥库中。

要将签名者添加到仓库,请使用 docker trust signer add 命令。

选项

选项默认值描述
--namesigner加载的密钥名称

示例

加载单个私钥

对于权限为 -rw------- 的私钥文件 alice.pem

$ docker trust key load alice.pem

Loading key from "alice.pem"...
Enter passphrase for new signer key with ID f8097df:
Repeat passphrase for new signer key with ID f8097df:
Successfully imported key from alice.pem

要指定名称,请使用 --name 标志

$ docker trust key load --name alice-key alice.pem

Loading key from "alice.pem"...
Enter passphrase for new alice-key key with ID f8097df:
Repeat passphrase for new alice-key key with ID f8097df:
Successfully imported key from alice.pem