Step 1 : create ECR repository
# handy commands
#login
$(aws ecr get-login --no-include-email --region ${YOUR_REGION})
e.g
$(aws ecr get-login --no-include-email --region ap-northeast-2)
====================================
# docker build
docker build -t ${REPOSITORY_NAME} .
e.g
docker build -t test/nginx .
====================================
# tag image for ECR upload
docker tag test/nginx:latest ${YOUR_ACCOUNT_ID}.dkr.ecr.${YOUR_REGION}.amazonaws.com/test/nginx:latest
e.g
docker tag test/nginx:latest 123456789012.dkr.ecr.ap-northeast-2.amazonaws.com/test/nginx:latest
====================================
# push image to ECR
docker push ${YOUR_ACCOUNT_ID}.dkr.ecr.${YOUR_REGION}.amazonaws.com/test/nginx:latest
e.g
docker push 530026923610.dkr.ecr.ap-northeast-2.amazonaws.com/test/nginx:latest