Forrest logo
back to the aws tool

aws-ecr:tldr:750e2

aws-ecr: Create a repository.
$ aws ecr create-repository --repository-name ${repository} --image-scanning-configuration scanOnPush=${select} --region ${region}
try on your machine

This command is used in the AWS command-line interface (CLI) to create a new repository in the Elastic Container Registry (ECR) service.

Here's a breakdown of the command:

  • aws ecr create-repository is the main command for creating a new repository in ECR.

  • --repository-name ${repository} specifies the name of the repository to be created. ${repository} is a placeholder for the actual name you need to provide.

  • --image-scanning-configuration scanOnPush=${select} enables image scanning for the repository. ${select} is a placeholder for a boolean value (true/false) indicating whether to enable image scanning on push. If set to true, it will enable image scanning.

  • --region ${region} specifies the AWS region where the ECR repository will be created. ${region} is a placeholder for the actual region you need to provide.

Overall, this command creates a new ECR repository with the given name, enables image scanning when pushing images to the repository, and creates it in the specified region.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the aws tool