docker swarm unlock-key

描述管理解锁密钥
用法docker swarm unlock-key [OPTIONS]

此命令适用于 Swarm 编排器。

描述

解锁密钥是在 Docker 守护进程之后解锁管理器所需的密钥 重新 启动。这些键仅在为 群。

您可以使用 查看或旋转解锁密钥。要查看密钥, 运行不带任何参数的命令:swarm unlock-keydocker swarm unlock-key

注意

这是一个集群管理命令,必须在 swarm 上执行 Manager 节点。要了解 Manager 和 worker,请参阅 文档。

选项

选择违约描述
-q, --quiet仅显示令牌
--rotate旋转解锁键

例子

$ docker swarm unlock-key

To unlock a swarm manager after it restarts, run the `docker swarm unlock`
command and provide the following key:

    SWMKEY-1-fySn8TY4w5lKcWcJPIpKufejh9hxx5KYwx6XZigx3Q4

Remember to store this key in a password manager, since without it you
will not be able to restart the manager.

使用标志将解锁密钥轮换为随机生成的新密钥 钥匙:--rotate

$ docker swarm unlock-key --rotate

Successfully rotated manager unlock key.

To unlock a swarm manager after it restarts, run the `docker swarm unlock`
command and provide the following key:

    SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8

Remember to store this key in a password manager, since without it you
will not be able to restart the manager.

(or ) 标志仅打印密钥:-q--quiet

$ docker swarm unlock-key -q

SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8

--rotate

此标志会轮换解锁密钥,将其替换为随机生成的新密钥 钥匙。旧的解锁密钥将不再被接受。

--quiet

仅打印解锁密钥,无说明。