0

I wish to deploy a private Docker registry in Jelastic environment.

I've deployed the registry:2 image from the marketplace and, once logged via ssh into the container, generated the CRT and KEY file.

I've defined REGISTRY_HTTP_TLS_CERTIFICATE and REGISTRY_HTTP_TLS_KEY pointing to their respective files into the container.

I've exposed the 5000 port through Jelastic's "endpoint" (resulting mapped to 11000)

But still when I run:

$ 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
lrkwz
  • 6,105
  • 3
  • 36
  • 59

1 Answers1

1

There are few possible reasons:

  1. As I see there is no Common Name (CN) in your certificate. Try to recreate certificate with CN.
  2. Your local daemon has wrong configuration.Try this with info how to use self-signed certificates

As for me, I'm using option "--insecure-registry". To add it you need to edit file /etc/default/docker on your local PC and add string (in your case): DOCKER_OPTS="--insecure-registry node4878-lrkwz-registry.jc.neen.it:11000/ OR INSECURE_REGISTRY='--insecure-registry node4878-lrkwz-registry.jc.neen.it:11000' File also can be located at /etc/sysconfig/docker

  • Ok I've got the point on certificates thank you. Still I cannot deploy ```$ 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) Sending image list Error: Status 503 trying to push repository dockersymfony_application: "{\"errors\":[{\"code\":\"UNAVAILABLE\",\"message\":\"service unavailable\",\"detail\":\"health check failed: please see /debug/health\"}]}\n"``` – lrkwz Dec 15 '15 at 17:47
  • @lrkwz , the root cause of this issue is the lack of folder "registry" in the "/var/lib/" directory. Make sure if you have this folder in the system. – Aless Dec 21 '15 at 13:22
  • ```/var/lib/registry/``` exists, contains a ```docker/``` directory and is owned by root ... and the error is somehow disappeared (?!!) – lrkwz Dec 21 '15 at 17:17
  • @lrkwz, the folder "registry" was created in your environment by the Jelastic team. FYI, since the Jelastic version 4.5 bug with creating folders from the Docker volumes will be fixed permanently. At the moment, as a workaround, you should create these folders manually. – Aless Dec 22 '15 at 16:24