95.4k views
3 votes
Command for a new swarm that will be locked on initialization.

A) docker swarm init --autolock

B) docker swarm init --lock

C) docker init-swarm --lock

D) docker init-swarm --autolock

User Luca Sepe
by
8.0k points

1 Answer

4 votes

Final answer:

The correct command to initialize a new Docker swarm with autolock feature enabled is 'docker swarm init --autolock'. This command enhances the security of the swarm by requiring an unlock key on manager start.

Step-by-step explanation:

The correct command to initialize a new Docker swarm that will be locked on initialization is:

A) docker swarm init --autolock

The '--autolock' feature is used to enable the automatic locking of the swarm when it is initiated, which means that you need to unlock it with a key when the manager starts. This provides an additional layer of security for the swarm's encryption key, which is used to protect sensitive data such as logs. The autolock feature is not enabled by default, and it must be explicitly activated through the '--autolock' option when the swarm is initiated. It should be noted that after initialization, you can also enable autolock by using the 'docker swarm update --autolock=true' command.

User Scopchanov
by
8.3k points