Merge pull request #2247 from queue-tip/ecr-batch-delete-image-fix
Delete ECR image when it has no tags
This commit is contained in:
commit
176799637c
2 changed files with 59 additions and 17 deletions
|
|
@ -403,7 +403,10 @@ class ECRBackend(BaseBackend):
|
|||
image_found = True
|
||||
repository.images[num].image_tag = image_id["imageTag"]
|
||||
response["imageIds"].append(image.response_batch_delete_image)
|
||||
repository.images[num].remove_tag(image_id["imageTag"])
|
||||
if len(image.image_tags) > 1:
|
||||
repository.images[num].remove_tag(image_id["imageTag"])
|
||||
else:
|
||||
repository.images.remove(image)
|
||||
|
||||
if not image_found:
|
||||
failure_response = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue