Harbor清理

Managed to get the mortensrasmussen clean up method to work:

1 - Disable authentication by editing common/config/registry/config.yml. Comment out
following section with hash.

auth:
token:
issuer: harbor-token-issuer
https://docker.iotechsys.com/service/token
rootcertbundle: /etc/registry/root.crt
service: harbor-registry

2 - Edit docker-compose.yml file to expose registry port:

registry:
ports:

  • 127.0.0.1:5000:5000

3 - Stop and restart harbor for changes to take effect

4 - Run cleanup to remove unused manifests

docker run --network="host" -it -v /data/registry:/registry -e REGISTRY_URL=http://127.0.0.1:5000 mortensrasmussen/docker-registry-manifest-cleanup
** 注意替换 /data/registry 文件夹内容 **

5 - Run normal cleanup to remove blobs now no longer associated with a manifest

docker run -it --name gc --rm --volumes-from registry vmware/registry-photon:v2.6.2-v1.4.0 garbage-collect /etc/registry/config.yml

6 - Back out config/compose file changes and restart harbor

https://github.com/goharbor/harbor/issues/3344

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容