DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Cover image for Pushing a docker container to Amazon Elastic Container Registry
Luiz Calaça
Luiz Calaça

Posted on

Pushing a docker container to Amazon Elastic Container Registry

Hi, Devs!

First of all, go to AWS Console and access on search field: Amazon ECR. Access the option view push commands.

AWS ECR

Execute the login command in your local console in your machine:

aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin<idaws>.dkr.ecr.us-east-1.amazonaws.com
Enter fullscreen mode Exit fullscreen mode

After build your docker image before tag it:

docker build -t <namebuild> .
Enter fullscreen mode Exit fullscreen mode
docker tag <namebuild> <idaws>.dkr.ecr.us-east-1.amazonaws.com/<namebuild>
Enter fullscreen mode Exit fullscreen mode

Now you could push it:

docker push <idaws>.dkr.ecr.us-east-1.amazonaws.com/<namebuild>
Enter fullscreen mode Exit fullscreen mode

You'll see in the list your image, now you could just refers the image name to others AWS services like Kubernetes.

AWS

That'all!

Contacts
Email: luizcalaca@gmail.com
Instagram: https://www.instagram.com/luizcalaca
Linkedin: https://www.linkedin.com/in/luizcalaca/
Twitter: https://twitter.com/luizcalaca

Top comments (0)

πŸ” If you came here from Google, why not take a look at some of our top posts?