How do you step and work with AWS ECR to manage your Docker images?
- 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.
- Install aws CLI commands
- Create a ECR repository – you can create it from AWS UI or from AWS CLI commands.
- Create a Repository name per docker application. This is because ECR does not allow many different dockers to be in the same repository
- There is a one to one relationship between docker for an application and repository
- Build your docker.
- 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.
- https://docs.aws.amazon.com/AmazonECR/latest/public/get-set-up-for-amazon-ecr.html – IAM user creation.
- https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html – AWS CLI installation
- https://docs.aws.amazon.com/AmazonECR/latest/userguide/getting-started-cli.html – AWS CLI usage.
- https://docs.aws.amazon.com/AmazonECR/latest/userguide/security_iam_id-based-policy-examples.html – IAM policy
- https://docs.aws.amazon.com/AmazonECR/latest/userguide/Registries.html#registry_auth – authentication setup