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 'https://gitlab.ourdomain.nl:5050'

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 gitlab.ourdomain.nl to login to docker.
We can’t do docker login gitlab.ourdomain.nl:5050 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 gitlab.ourdomain.nl and then try to push a container starting with the name gitlab.ourdomain.nl 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>
        <p>

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

The push refers to repository gitlab.ourdomain.nl:5050/namespace/project/containername]
Get "https://gitlab.ourdomain.nl:5050/v2/": 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'] = "https://gitlab.ourdomain.nl"
which didn’t change the results.

Hello, We have the same issue