How to create the ECR(Elastic Container Registry)?
- First of all, create your free AWS account and configure it and log in with your credential. if you don't know how to do it click the below link.
How to create the free tier account on AWS
Then you will be directed to the below interface
In the top left search with ECR and in the Elastic Container Registry, then click on Get Started and select the option public or private Registry Give the name to your Registry and Click OK. Your Registry setup would be done.
What problem usually all Beginners faced while pushing the image?
Command 'docker' not found, but can be installed with:
Command aws not found, but can be installed with:
Unable to locate credentials. You can configure credentials by running "aws configure". Error: Cannot perform an interactive login from a non-TTY device
Permission denied
How to create the credentials required for AWS configuration?
Go to the account and click on the Security credential and Scroll down you will see the Access key section click on the Create key and download the security file.
How to solve the above problem?
Run
sudo apt install docker.io
to install dockerRun
sudo docker login
put your username and passwordRun
sudo apt install aws-cli
to install AWS command line interfaceRun
sudo aws configure
and give your Access key id and secret key id and leave the Region and Ouput section defaultPermit your docker client
sudo chmod 666 /var/run/docker.sock
Now, If you follow all the above that i mentioned then go to your registry that you made and click on the click option then click on the push command and run all the command mentioned over there make sure you should follow the all the above steps before applying pushing command.