Docker in AWS with ECR

How do you step and work with AWS ECR to manage your Docker images?

  1. Create IAM User – Amazon ECR requires that you provide credentials when you access them, so that the service can determine whether you have permission to access its resources. The console requires your password. AWS don’t recommend that you access AWS using the credentials for your AWS account; they recommend that you use AWS Identity and Access Management (IAM) instead. Create an IAM user, and then add the user to an IAM group with administrative permissions or grant this user administrative permissions. You can then access AWS using a special URL and the credentials for the IAM user.
  2. Install aws CLI commands
  3. Create a ECR repository – you can create it from AWS UI or from AWS CLI commands.
    1. Create a Repository name per docker application. This is because ECR does not allow many different dockers to be in the same repository
    2. There is a one to one relationship between docker for an application and repository
  4. Build your docker.
  5. Use AWS CLI and docker commands to push the Docker into the ECR. NOTE: the AWS ECR provides command for the push and pull from repository.