When comparing Docker Registry 2.0 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 Registry 2.0 is ranked 2nd. 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 Maintains several storage drivers to allow for different models of image retention
Currently includes in-memory, local filesystem, Azure, and S3.
Pro Simple to set up
Pro Only supports docker images
If you want more then go somewhere else! :)
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 Biggest CON there is that it cannot control deleting of images properly
Bottom line is this makes docker registry suck when your harddisk fills up at the wrong time and you cannot push out your builds!
Con No inbuilt access control provided
Authentication or Authorization is not provided by default and needs to be handled externally. An optional authentication should have been provided, given that docker client has inbuilt authentication.
Con Only supports docker images
Con Sometimes images disappear
Con Setting it up may require some work
Setting up the new Docker Registry 2.0 requires some more setup than usual. Especially dependencies need to be installed beforehand.
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.
