Put together from information in:
https://github.com/docker/distribution/blob/master/reference/reference.go (see comment at the beginning of the file)
and
https://github.com/docker/distribution/blob/master/reference/normalize.go (see func splitDockerDomain
)