Forrest logo
back to the docker tool

docker:tldr:d75c3

docker: Change the valid period for node certificates.
$ docker swarm update --cert-expiry ${hours}h${minutes}m${seconds}s
try on your machine

The command docker swarm update --cert-expiry ${hours}h${minutes}m${seconds}s is used to update the certificate expiration time for a Docker swarm.

In a Docker swarm (which is a cluster of multiple Docker nodes), certificates are used for secure communication between the swarm manager and worker nodes. These certificates have an expiration time after which they are considered invalid.

By running this command, you can update the expiration time of these certificates. The ${hours}h${minutes}m${seconds}s part is a placeholder that allows you to specify the desired expiration time in hours, minutes, and seconds.

For example, if you want to set the certificate expiration time to 2 hours, 30 minutes, and 45 seconds, you would replace ${hours}h${minutes}m${seconds}s with 2h30m45s. This will update the certificate expiration time accordingly.

Overall, this command is used to update the certificate expiration time for a Docker swarm, allowing you to control how long the certificates are valid before they need to be renewed.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the docker tool