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
    

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs