-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Expand file tree
/
Copy pathdocker_swarm_unlock-key.yaml
More file actions
107 lines (88 loc) · 3.01 KB
/
docker_swarm_unlock-key.yaml
File metadata and controls
107 lines (88 loc) · 3.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
command: docker swarm unlock-key
short: Manage the unlock key
long: |-
An unlock key is a secret key needed to unlock a manager after its Docker daemon
restarts. These keys are only used when the autolock feature is enabled for the
swarm.
You can view or rotate the unlock key using `swarm unlock-key`. To view the key,
run the `docker swarm unlock-key` command without any arguments:
> [!NOTE]
> This is a cluster management command, and must be executed on a swarm
> manager node. To learn about managers and workers, refer to the
> [Swarm mode section](/engine/swarm/) in the
> documentation.
usage: docker swarm unlock-key [OPTIONS]
pname: docker swarm
plink: docker_swarm.yaml
options:
- option: quiet
shorthand: q
value_type: bool
default_value: "false"
description: Only display token
details_url: '#quiet'
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
- option: rotate
value_type: bool
default_value: "false"
description: Rotate unlock key
details_url: '#rotate'
deprecated: false
hidden: false
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
inherited_options:
- option: help
value_type: bool
default_value: "false"
description: Print usage
deprecated: false
hidden: true
experimental: false
experimentalcli: false
kubernetes: false
swarm: false
examples: |-
```console
$ 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-aabbccdd00112233aabbccdd00112233aabbccdd00112233aa-aabbccdd00112233...
Remember to store this key in a password manager, since without it you
will not be able to restart the manager.
```
Use the `--rotate` flag to rotate the unlock key to a new, randomly-generated
key:
```console
$ 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-aabbccdd00112233aabbccdd00112233aabbccdd00112233aa-aabbccdd00112233...
Remember to store this key in a password manager, since without it you
will not be able to restart the manager.
```
The `-q` (or `--quiet`) flag only prints the key:
```console
$ docker swarm unlock-key -q
SWMKEY-1-aabbccdd00112233aabbccdd00112233aabbccdd00112233aa-aabbccdd00112233...
```
### `--rotate` {#rotate}
This flag rotates the unlock key, replacing it with a new randomly-generated
key. The old unlock key will no longer be accepted.
### `--quiet` {#quiet}
Only print the unlock key, without instructions.
deprecated: false
hidden: false
min_api_version: "1.24"
experimental: false
experimentalcli: false
kubernetes: false
swarm: true