- AWS Container Registry (ECR)

Basics of AWS container registry and pushing an image.

Introduction

In order to use your Docker image in an orchestration system, you need to push your image to a Docker registry that works with the platform. For ECS, the AWS implementation of these services is called AWS Elastic Container Registry (ECR). ECR is a managed Docker registry that you can use to store and manage images within the AWS ecosystem. It works well with both ECS and EKS.

Using docker image in ECR
Using docker image in ECR

The goal of this lesson is to walk through the process of getting a Docker image from an EC2 instance or your local machine to ECR. We’ll cover the following steps:

  1. Setting up an ECR repository
  2. Creating an IAM role for ECR
  3. Using docker login
  4. Tagging an image
  5. Pushing an image

Setting up an ECR repository

The first step is to create a repository for the image that we want to store on ECR. A registry can have multiple repositories, and each repository can have multiple tagged images. To set up a new repository, perform the following steps from ...