I tried to push the Docker container. But it gave me a "no basic auth credentials" error. Even I used aws ecr get-login-password
and entered my credentials with docker configure
and managed to create repository from terminal in AWS, pushing did not work. Does anybody know why I cannot push to AWS?
Thank in advance.
it is authentication, first retrieve an authentication token and authenticate your Docker client to your registry:
aws ecr get-login-password --region ap-south-1 | docker login --username AWS --password-stdin {account_id}.dkr.ecr.ap-south-1.amazonaws.com
after you build and tag, push depending on your tag:
docker push ${account_id}.dkr.ecr.ap-south-1.amazonaws.com/${repo_name}:latest
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.