我设置图像生命周期策略来删除未标记的图像和具有特定前缀的图像
{
"rules": [
{
"rulePriority": 1,
"description": "Delete untagged images",
"selection": {
"tagStatus": "untagged",
"countType": "sinceImagePushed",
"countUnit": "days",
"countNumber": 1
},
"action": {
"type": "expire"
}
},
{
"action": {
"type": "expire"
},
"selection": {
"countType": "sinceImagePushed",
"countUnit": "days",
"countNumber": 5,
"tagStatus": "tagged",
"tagPrefixList": [
"staging"
]
},
"description": "Delete old staging images",
"rulePriority": 2
}
]
}
我点击“测试规则”,dryRun 正确显示了所有受影响的图像。但即使我等了几天,它实际上也没有删除任何未标记的图像。可能是什么原因?为什么它在“测试”中有效,但不适用于存储库本身?
未标记的图像由
docker buildx
为多种架构创建。就像 buildx 推送后的剩菜一样。