How does GitLab manage docker images


I’m trying out the GitLab Container Registry. So far, it seems interesting. I’d like to understand how GitLab manages the docker images. I noticed that when I delete a docker image using the GitLab UI (/container_registry/), the image name is removed from the GitLab UI. But, if I push the same image from my build machine to that registry, it says the image already exists. Then GitLab UI shows that image again.

That’s why I’d like to understand how Gitlab manages the docker images. Is it actually deleting the images or just removing the tag from project? Are there any admin tool/option available (now or in planning) to manage docker images better?

The documentation does seem to state that the tag is removed. That would imply that the underlying images and layers are not removed. At some point Gitlab would probably need to introduce some sort of garbage collection feature for the docker registry. Unfortunately, direct API access to the registry also does not seem to be enabled. We probably need to raise an issue with the Gitlab project and hope that they can implement this in a future release.

Hi @jliu, there’s already an issue regarding introducing a command for the omnibus package to initiate garbage collection

Thanks for the info! Looking forward to when it’s available!