AWS ECR 生命周期策略未执行但在测试中有效

问题描述 投票:0回答: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 推送后的剩菜一样。

amazon-web-services docker amazon-ecr buildx
1个回答
0
投票

根据生命周期策略用户指南中的第一段

受影响的图片最多可能需要 24 小时才能过期.

S3 生命周期策略也有相同的行为。

© www.soinside.com 2019 - 2024. All rights reserved.