When comparing Docker Hub vs Gitlab Container Registry, the Slant community recommends Gitlab Container Registry for most people. In the question“What are the best docker image private registries?” Gitlab Container Registry is ranked 1st while Docker Hub is ranked 15th. The most important reason people chose Gitlab Container Registry is:
Good integration into the repository you build your docker images out of. Just activate it for your repo and you're done. Most of the time new projects/repo have it on by default.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Shares user accounts with the dominant public registry, Docker Hub
Pro Integration into GitLab
Good integration into the repository you build your docker images out of. Just activate it for your repo and you're done. Most of the time new projects/repo have it on by default.
Pro Free
Cons
Con No longer free
Rate limits on downloads can royally screw your deployments. In 2021, they will start deleting containers which haven't been pulled for six months. This will suck for stable software which doesn't get redeployed frequently.
Con Gives no metadata about image tags beyond their name
No information about when the image was created, pushed, what Dockerfile it came from, what user(s) pushed it, etc.
Con Poor user interface design
Con Default to public makes it dangerous
Since by default your account will create new repositories publicly, you could fairly easily leak sensitive images with one bad push.
Con Tight integration into GitLab
If you're not building your docker images via GitLab CI, it's kinda hard to push images to the registry.
Con Docker garbage collection
Gitlab has very poor docker garbage collection management by default. One must read a good portion of the documentation to know what to do, so that garbage collection kicks in.