Commandes Linux : docker-machine regenerate-certs

DOCKER-MACHINE REGENERATE-CERTS

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

Regenerate TLS Certificates for a machine

Description:
   Argument(s) are one or more machine names.

Options:

   --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 "192.168.99.102:2376": x509: certificate is valid for 192.168.99.101, not 192.168.99.102
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_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.102:2376"
export DOCKER_CERT_PATH="C:\Users\DarwinOS\.docker\machine\machines\manager"
export DOCKER_MACHINE_NAME="manager"
export COMPOSE_CONVERT_WINDOWS_PATHS="true"
# Run this command to configure your shell:
# eval $("C:\Program Files\Docker Toolbox\docker-machine.exe" env manager)

 

Fermer le menu
%d blogueurs aiment cette page :