Please replace the <AWS_REGION> and <AWS_URI> placeholders with the proper values. In successive commands, we will using 123456789123.dkr.ecr.us-east-1.amazonaws.com/test-image as the URI sample.
aws ecr get-login-password --region <AWS_REGION> | docker login --username AWS --password-stdin <AWS_URI>
docker build --tag 123456789123.dkr.ecr.us-east-1.amazonaws.com/test-image .
docker push 123456789123.dkr.ecr.us-east-1.amazonaws.com/test-image
docker pull 123456789123.dkr.ecr.us-east-1.amazonaws.com/test-image:latest