for the first time

see Amazon EC2 Container Service First Run

install aws client

curl “" -o “”
sudo python
sudo pip install awscli

configure aws client

prepare aws key

create IAM role and prepare access key and secret key

set keys to awsclient

$ aws configure

AWS Access Key ID [None]: xxxxxxxxxxxxxxxxxxxx
AWS Secret Access Key [None]: ........................................
Default region name [None]: us-east-1
Default output format [None]:

create ecr

region: us-east-1

and create a repository

push a docker image

connect local to aws

retrieve a docker login command
$ aws ecr get-login –region us-east-1

docker login -u AWS -p xxxxxx -e none

run the docker login above

prepare docker image

docker build -t sample .

tag a docker image

make tag name same as ecr name

docker tag sample

upload images

docker push