nexus仓库上删除docker镜像,释放磁盘空间

镜像清理工具:

wget https://s3.eu-west-2.amazonaws.com/nexus-cli/1.0.0-beta/linux/nexus-cli

chmod +x nexus-cli

./nexus-cli configure

  1. Enter Nexus Host: http://127.0.0.1:8081

  2. Enter Nexus Repository Name: test

  3. Enter Nexus Username: admin

  4. Enter Nexus Password: xxxxxx

查看镜像

./nexus-cli image ls

查看镜像信息

 

  1. nexus-cli image tags -name IMAGE_NAME #查看某一镜像的所有的tag

  2. nexus-cli image info -name IMAGE_NAME -tag TAG #查看某一镜像详细信息

删除镜像

  1. nexus-cli image delete -name IMAGE_NAME -tag TAG #删除指定tag的指定镜像

  2. nexus-cli image delete -name IMAGE_NAME -keep X #仅保留X项tag,其余全部删除

  3. 例如清理具体的镜像,保留版本号最大的5个: ./nexus-cli image delete -n 123.com/web -k 5

 

因为我的tag都是统一latest,统一的tag上传还是会占有很多空间,虽然只看到一个images的tag,10多个镜像200m左右,上传了一个月左右居然达到150左右,所以直接按图执行就可了

(1)delete unused docker manifests and images(2)Compact blob store  之前只执行了Compact blob store 这个清理 效果不大

两个执行后,再看空间从150g 降到10多G

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值