在Jelastic中部署Dockerregistry
我希望在Jelastic环境中部署私有Dockerregistry。
我已经部署了市场上的registry:2图像,并通过sshlogin到容器中,生成了CRT和KEY文件。
我已经将REGISTRY_HTTP_TLS_CERTIFICATE和REGISTRY_HTTP_TLS_KEY指向它们各自的文件定义到容器中。
我已经通过Jelastic的“端点”公开了5000端口(结果映射到11000)
但是当我运行时:
$ docker push node4878-lrkwz-registry.jc.neen.it:11000/dockersymfony_application The push refers to a repository [node4878-lrkwz-registry.jc.neen.it:11000/dockersymfony_application] (len: 1) unable to ping registry endpoint https://node4878-lrkwz-registry.jc.neen.it:11000/v0/ v2 ping attempt failed with error: Get https://node4878-lrkwz-registry.jc.neen.it:11000/v2/: x509: certificate is valid for , not node4878-lrkwz-registry.jc.neen.it v1 ping attempt failed with error: Get https://node4878-lrkwz-registry.jc.neen.it:11000/v1/_ping: x509: certificate is valid for , not node4878-lrkwz-registry.jc.neen.it
有几个可能的原因:
- 正如我所见,您的证书中没有通用名称(CN)。 尝试用CN重新创build证书。
- 您的本地守护程序configuration错误。请尝试使用如何使用自签名证书的信息
至于我,我正在使用选项“–insecure-registry”。 要添加它,你需要编辑你的本地PC上的文件/ etc / default / DOCKER_OPTS="--insecure-registry node4878-lrkwz-registry.jc.neen.it:11000/
并添加string(在你的情况下): DOCKER_OPTS="--insecure-registry node4878-lrkwz-registry.jc.neen.it:11000/
INSECURE_REGISTRY='--insecure-registry node4878-lrkwz-registry.jc.neen.it:11000'
文件也可以位于/ etc / sysconfig / docker