How to Push Docker Images into AWS ECR( Elastic Container Registry)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
good evening everyone i hope you're all doing well i'm also well so let's start today i'm going to show you how you can um [Music] push your docker images to amazon ecr so what is easier so if we uh go to awstcr if you google it then it is amazon elastic container registry so amazon elastic container registry amazon pcr you can store your containers or you can store your images um into ecr and then use that image into ecs or aws fargate to launch uh your docker into a application so um today i'm going to show you how you can register or how you can push your images to mws here to do this um i have already created an image into my localhost but i am going to rebuild it again so um this is my docker file which is simple it is copying uh from a node image and then it is installing yum not packages npm packages and then it is exposing port 8080 with server.js and inside server.js there is an express app which is just saying so now uh what we have to we need to do is we need to first create an i am user an iem user with permissions to ecr so that it can upload the images over there so i am user i am going to create a new user lot of users here in my account so let's create a new user one more time and um let's give it a name easier user and it will be only programmatic access so let's go to next then i am going to copy uh permissions to container registry so okay we have two registry services amazon ec2 container registry full access and elastic container registry public full access okay now let's go go to the tags review create user awesome so i'm going to use this access id and i'm going to configure my local awcli i have already installed aws cli into my local so i'm just going to configure it again if you haven't installed aws cli you can watch my other videos on how can you install aws cli it's very simple you can just google aws cli install windows audio just linux windows 10 so you can just download the uh msi file and install it now uh i already installed it so what i'm going to do is i'm going to run aws configure then it will ask me for an api key i'm going to copy this api key this one here and then i'm going to copy another api key region i'm going to use ap southeast one and format json okay so i have configured my aws uh i aim user let's close this then um let's go to uh pcr from my console you see our elastic container registry and into easier i will create a new repository so create a repository and give it a name private repository and then create repository so this is my repository where i'm going to push my images so uh i click here view push commands and i'm just going to copy this and i'm going to paste it into my powershell and as you can see if you have permissions you will get a message that login successful and that means i have successfully registered my local terminal with easier with my iam user and now i can push images to easier then what i have to do is i just need to build the image with this name even though i have already built the image but let's try it again one more time okay so the build is done now i'm going to tag the image so after the build completes the i give images so you can push the image to this repository i'm going to take this very simple the command is docker tag then this is my uh local image name and this is my aws pcr repository press enter tagging is done i'm going to push it yes okay this will push my image to uh iwccr and um based on your image size it can take some time because if your image size is like one giga pipe then it can take quite a lot of time my image size is around 105 megabytes so it shouldn't take not more than one or two minutes so let's wait for that turn and then when it is done we are going to see that this image is uploaded to easier and we can use this image into amazon ecs to create new uh docker uh ecs taxes or we can use this into ecs target so um let's it's almost done done let's see might take some time in your machine based on your internet connectivity and also your image size so this is done this is the digest sha-256 c7745 now i'm going to close this i'm going to refresh this button and if you see this is my latest image and this is uploaded match 12 size 44 make and this is the digest sha-256 this is c7745 [Music] so uh this is the image uri we can copy it from here and then you can use this image ai to create new uh ecs stacks or ecs in useless in other places so this is the basic tutorial on how you can register and push your images to aws easier and it is it can be private it can be public and you can safely push your bills into this repository system and use it into your other places where you are building or running the containers so thank you for watching this video if this is helpful please subscribe to my channel and i will create more videos on docker and calendars thank you have a nice day bye you
Info
Channel: AWS With Atiq
Views: 32,068
Rating: undefined out of 5
Keywords: aws, tutorial, beginner, docker, ecr, devops, quick
Id: t0TXPCwcg3I
Channel Id: undefined
Length: 8min 54sec (534 seconds)
Published: Sun Mar 13 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.