Self-Signed SSL Certificate for private Docker Registry?

Hi, I tried to use a private Docker Registry, but it always said, that the HTTPS Client couldn’t use a HTTP Registry.

After that i tried to use self-signed certificates, but then, it says that the certificate isn’t signed, because it didn’t have the ca.crt in the container.

The second problem is, that my Containers doesn’t use the hosts from my machines. I need to go into the container with docker exec and manually add the hostname from my docker-registry.

So my questions are:
Can I add the ca.crt and the hostname for my docker-registry in any way with the install of gitpod.
The problem is, that if I can add both manually with docker exec, the next time, the container restarts or it has some problems, the chances are very high, that i need to configre both again.

I try to tell Kubernetes and Docker, that they automatically add the certificate and the hostname in the container.

TL;DR: Can i add the hostname and self-signed certificate for a private docker-registry automatically with the install of gitpod?

Does someone know, if this works and if yes, how?

To configure your own registry have a look at this one: https://github.com/gitpod-io/gitpod/blob/master/docs/self-hosted/install/docker-registry.md

Regarding self-signed certs you can have a look at this discussion: https://github.com/gitpod-io/gitpod/issues/2615#issuecomment-756068915