Commandes Linux : docker-machine regenerate-certs


Commande : docker-machine regenerate-certs
Usage: docker-machine regenerate-certs [OPTIONS] [arg...]

Regenerate TLS Certificates for a machine

   Argument(s) are one or more machine names.


   --force, -f          Force rebuild and do not prompt
   --client-certs       Also regenerate client certificates and CA.


Régénérer le certificat TLS d’une machine Docker :

docker-machine regenerate-certs machine

ex :

$ docker-machine env manager
Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "": x509: certificate is valid for, not
You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'.
Be advised that this will trigger a Docker daemon restart which might stop running containers.
$ docker-machine regenerate-certs manager
Regenerate TLS machine certs?  Warning: this is irreversible. (y/n): y
Regenerating TLS certificates
Waiting for SSH to be available...
Detecting the provisioner...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
$ docker-machine env manager
export DOCKER_HOST="tcp://"
export DOCKER_CERT_PATH="C:\Users\DarwinOS\.docker\machine\machines\manager"
export DOCKER_MACHINE_NAME="manager"
# Run this command to configure your shell:
# eval $("C:\Program Files\Docker Toolbox\docker-machine.exe" env manager)