ssl - Docker private registry | TLS certificate issue -


i've tried follow following tutorial setup our own private registry (v2) on aws centos machine.

i've self signed tls certificate , placed in /etc/docker/certs.d/machine_statis_ip:5000/

when trying login registry (docker login machine_ip:5000) or push tagged repository (machine_ip:5000/ubuntu:latest) following error :

error response daemon: https://machine_ip:5000/v1/users/: x509: cannot validate certificate machine_ip because doesn't contain ip sans 

tried search answer 2 days, couldn't find any. i've set certificate cn (common name) machine_static_ip:5000

when using self signed tls certificate docker daemon require add certificate it's known certificates.

use keytool command grab certificate :

keytool -printcert -sslserver ${nexus_domain}:${ssl_port} -rfc > ${nexus_domain}.crt

and copy client's machine ssl certificates directory (in case - ubuntu):

sudo cp ${nexus_domain}.crt /usr/local/share/ca-certificates/${nexus_domain}.crt && sudo update-ca-certificates

now reload docker daemon , you're go :

sudo systemctl restart docker


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -