DEV Community

Roman
Roman

Posted on

2 1

AWS Elastic Container Registry Cheat Sheet

Amazon Elastic Container Registry (Amazon ECR) - Fully managed container registry offering high-performance hosting, so you can reliably deploy application images and artifacts anywhere

Alternatives

  • Docker Hub
  • JFrog Artifactory
  • Azure Container Registry
  • Harbor
  • Google Container Registry
  • Red Hat Quay
  • JFrog Container Registry

Quick start

  • Login
    • get-login-password:aws ecr get-login-password --region region | docker login --username AWS --password-stdin aws_account_id.dkr.ecr.region.amazonaws.com
  • Create a repository:

    aws ecr create-repository \
        --repository-name hello-repository \
        --image-scanning-configuration scanOnPush=true \
        --region region
    
  • Tag image

    • docker tag hello-world:latest aws_account_id.dkr.ecr.region.amazonaws.com/hello-repository
  • Push

    • docker push aws_account_id.dkr.ecr.region.amazonaws.com/hello-repository
  • Pull

    • docker pull aws_account_id.dkr.ecr.region.amazonaws.com/hello-repository:latest
  • Delete an image

    aws ecr batch-delete-image \
        --repository-name hello-repository \
        --image-ids imageTag=latest \
        --region region
    
  • Delete a repository

    aws ecr delete-repository \
      --repository-name hello-repository \
      --force \
      --region region
    
Retry later

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Retry later