How to push your image on AWS ECR

April 11, 2020

Find the image you want to push

docker images

Tag your image with the ECR registry (replace with your image-id, region name and choose name for your registry)

docker tag <image-id> <aws_account_id>.dkr.ecr.<region><my-app>

Finally. Push the image to the registry

docker push <aws_account_id><my-app>

 If you get this error

denied: Your Authorization Token has expired. Please run 'aws ecr get-login --no-include-email' to fetch a new one.

Run the command as suggested and then copy the output and run it as command (will look like docker login -u AWS -p XXXX........)