registry: offer the docker REST api endpoints
When wanting to create 'latest' tags on a docker registry (using the docker image to build with) from the CI:
image: registry.hub.docker.com/library/docker:stable
we need to know a list of available REMOTE tags. e.g. the script needs to be smart enough not to tag the v5.0 branch with 'latest', but only the highest version, e.g. v6.0.
To obtain the list of available tags of a docker registry, we can only use the REST api (https://stackoverflow.com/questions/28320134/how-to-list-all-tags-for-a-docker-image-on-a-remote-registry)
Further more, when wanting to get a list of docker tags from gitlab registries specifically, an API exists, however it deviates from the docker hub API, making it not possible to have a generic way to access this information, that works on all docker registries, being it from gitlab, docker hub or elsewhere.
Since it is unlikely that the docker clients introduces this feature (it was requested already a few times), we can at least over an equivalent method to accessing this information, by enabling the generic v1 REST API on the registry (or have a compatibility wrapper).
If however, already works, then documentation is needed, as it is unclear how this is done (https://gitlab.com/help/user/project/container_registry).