6

We're using AWS ECR to host our docker images. We've noticed in a few rare instances that the docker push command can complete successfully, but the resulting image does not appear in the ECR container repository.

Any others experiencing this issue? Our ECR is in us-east-1

Output from our docker push script:

WARNING: login credentials saved in /home/ubuntu/.docker/config.json
Login Succeeded
The push refers to a repository [<our-id>.dkr.ecr.us-east-1.amazonaws.com/<our-repo>] (len: 2)
...
develop: digest: sha256:<redacted-sha> size: 36365
develop.<redacted-tag>: digest: sha256:<redacted-sha> size: 36370
Adam Kaplan
  • 71
  • 1
  • 4
  • Has it always been like that, or did you just start experiencing this behavior? – EEAA Sep 14 '16 at 21:42
  • Do you mean ECS, the Ec2 Container Service https://aws.amazon.com/ecs/getting-started/ ? – Tim Sep 14 '16 at 23:00
  • I refer to the Repositories feature of ECS - Elastic Container Repositories. I think we discovered what happened - somehow our CI server reported an image was pushed, when it fact the image did not successfully push to the AWS docker repo – Adam Kaplan Sep 15 '16 at 15:21
  • We are seeing this as well! It appears to be a concurrency problem. If we are pushing image A with layers [a,b,c,d] and image B with layers [a,b,c,e] at the same time, docker reports both pushes are successful but neither A nor B exist in ECR. – MikeyB Mar 22 '22 at 20:42

1 Answers1

9

We have noticed that the AWS ECR Repositories Console does not list recently pushed/tagged images in real time. Link: https://console.aws.amazon.com/ecs/home?region=us-east-1#/repositories (specify your region if necessary).

If you execute the following AWS CLI command, you will see all repos pushed. Even those that do not yet appear in the AWS ECR console.

 aws ecr list-images --repository-name=REPOSITORYNAME --region=REGION
johnsampson
  • 193
  • 1
  • 6
  • There's possibly something else at play, which is the pagination on the image list is dysfunctional. The images you see on the first page appear to be picked at random (not e.g. with newest first), and if you sort by one of the column headers, it only sorts the currently visible rows, not all rows across all pages. So you might not see your new images appear because they are on the second page -- and perhaps later when you reload the page, the row order is shuffled and you can see your new images. – Hugh W Nov 28 '18 at 17:07
  • I saw the same behaviour when I was accidentally using old AWS credentials file. I was indeed creating a repository, but in a totally different account ) – Anatoly Alekseev Apr 07 '22 at 22:31