Skip to content

Unable to delete image from container registry

Summary

Under certain conditions it is not possible to delete a container image from the integrated Gitlab container registry. Some implications are that you can neither move nor delete the repository.

Steps to reproduce

  1. Push a docker image using (any version essentially; tested with 1.4.4) podman to the Gitlab container registry of some Gitlab repository.
  2. Try to delete the pushed image or try to delete the repository. It will fail.

Example Project

https://gitlab.com/cip-playground/gitlab-cloud-ci

What is the current bug behavior?

It is not possible to delete the container image.

What is the expected correct behavior?

It should always be possible to delete container images if they were accepted by the container registry.

Relevant logs and/or screenshots

This project was scheduled for deletion, but failed with the following message: Failed to remove some tags in project container registry. Please try again or contact administrator.

Output of checks

This bug happens on GitLab.com

Possible fixes

Check your logs. If I take a look at the container image in the browser, I can see that some metadata is missing. My guess is that this triggers a NPE or similar in the code.