我想运行一个广泛可用的私人码头注册表.
所以我将能够从其他服务器推送和提取图像.
我正在学习这个教程:doc1& doc2
我执行了3个步骤:
首先我创建了我的证书和密钥(作为CNAME,我填写了我的ec2-hostname)
mkdir -p certs && openssl req \n -newkey rsa:4096 -nodes -sha256 -keyout certs/domain.key \n -x509 -days 365 -out certs/domain.crt
我使用此密钥创建了我的docker注册表.
docker run -d -p 5000:5000 --restart=always --name registry \n -v `pwd`/certs:/certs \n -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt \n -e REGISTRY_HTTP_TLS_KEY=/certs/domain.key \n registry:2
比我将domain.crt的内容复制到/etc/docker/certs.d/ec2-xx-xx-xx-xx.compute.amazonaws.com:5000/ca.crt
我重新启动了我的docker:sudo service docker restart
当我尝试推送图像时,我收到以下错误:
unable to ping registry endpoint https://ec2-xx-xx-xx-xx.compute.amazonaws.com:5000/v0/
v2 ping attempt failed with error: Get https://ec2-xx-xx-xx-xx.compute.amazonaws.com:5000/v2/: net/http: TLS handshake timeout
v1 ping attempt failed with error: Get https://ec2-xx-xx-xx-xx.compute.amazonaws.com:5000/v1/_ping: net/http: TLS handshake timeout
我真的不知道我错过了什么或做错了什么.有人可以帮帮我吗.谢谢