amazon web services – docker image can’t recognize the right tag when I try to push it to ECR

I build image with the command:

 docker build -t ecr-repo-name:terraform-0.13.4 .

This gave me:
Successfully tagged ecr-repo-name:terraform-0.13.4

Then I tried to push it to this ecr repo:

docker push

but this gave me error:

The push refers to repository []
tag does not exist:

Why the tag became ‘’ instead of ‘ecr-repo-name:terraform-0.13.4’? I don’t understand…. Can someone help me please, am I missing anything?