1

我设置图像生命周期策略以删除未标记的图像和具有特定前缀的图像

{
  "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 推送后的剩菜一样。

4

0 回答 0