Docker connection error on container registry

We are trying to add the Docker container registry to the Gitlab Instance.

We added the following line to the gitlab.rb config.
registry_external_url ''

We expected it to work after opening the 5050 as a allowed port in the firewall config but it doesn’t work.

We can do docker login to login to docker.
We can’t do docker login to login to docker It will eventuele timeout

When going to the /container_registry page in Gitlab, the page freezes for some time before showing Docker connection error on the page.

After we do login with docker login and then try to push a container starting with the name we get a html error page as response containing the text:

<h3>The page could not be found
            or you don't have permission to view it.</h3>
        <hr />
        <p>The resource that you are attempting to access does not exist or you don't have the necessary
            permissions to view it.</p>
        <p>Make sure the address is correct and that the page hasn't moved.</p>

When we push a container containing the port in the image we get the following error:

The push refers to repository]
Get "": net/http: request canceled (Client.Timeout exceeded while awaiting headers)

What could cause this errors? Are we misconfiguring something?

We also tried with setting the value
registry['token_realm'] = ""
which didn’t change the results.