Eric Zhang

Results 10 comments of Eric Zhang

+1 for this. Looking forward to being merged!

Unfortunately, I got the same problem here with Grafana v8.3.3.

这个需要仔细讨论如何实现,因为需要在 registry 的服务中运行一个命令去做垃圾收集,registry 没有提供 API 去做这件事。 #### Useful links: - [Garbage collector on API #1515](https://github.com/docker/distribution/issues/1515) - [docs-garbage-collection for registry](https://github.com/docker/distribution/blob/master/docs/garbage-collection.md#running-garbage-collection) - [删除Docker Registry里的镜像怎么那么难](http://qinghua.github.io/docker-registry-delete/)

registry 有挺多不完善的地方,把一个镜像的所有 tag 都删除后获取所有镜像列表的 API 仍会返回这个镜像,如果要实现镜像删除功能只能在数据库中加一个 `is_deleted` 字段去判断镜像是否已被删除,同时在新建镜像时再进行必要处理

@fsword harbor 是没有做GC的,需要停掉所有服务后用命令手动完成:https://github.com/vmware/harbor/blob/master/docs/user_guide.md#deleting-repositories

想了一下,在设置里面定义固定的 GC 时间段不太可行,要考虑各种周期,而且管理员去主动配合这个周期也不太现实。并且按照 Registry 的设计方式来说,GC 应该是频率很低的。 感觉更好的方案是直接在系统设置中加上一个是否允许用户 push,管理员在 GC 前去开启这个选项,GC 结束后再去关闭这个选项可能会更好一点。

但是自动在GC前禁止push是很难实现的

补充:用户名同时还能作为 web 界面的认证身份识别 用户名作为命名空间肯定是需要的,作为一个互联网服务似乎去掉邮箱认证并不是很好?

> @qinix I assume you have this issue only on tables written with older versions and then read with the latest main? Yes, it is