docker trust key load
| 描述 | 加载用于签名的私钥文件 |
|---|---|
| 用法 | docker trust key load [OPTIONS] KEYFILE |
描述
docker trust key load 将私钥添加到本地 Docker 信任密钥库。
要将签名者添加到仓库,请使用 docker trust signer add。
选项
| 选项 | 默认值 | 描述 |
|---|---|---|
--name | 签名者 | 已加载密钥的名称 |
示例
加载单个私钥
对于权限为 -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