Storing your own Docker image on the cloud with Amazon ECR

Managing container images for cloud deployment Docker image is like a process template that we run to…

Hui Fang Yeo
March 03, 2021
Scroll to read the aricle

Storing your own Docker image on the cloud with Amazon ECR

Managing container images for cloud deployment

Docker image is like a process template that we run to instantiate our containers. You probably heard of Docker Hub, a public registry that stores Docker images. While we can deploy Docker images from Docker Hub on AWS, we will explore the Amazon Elastic Container Registry (ECR) to store our customized Docker image.

Prerequisites

You can create a free account with the AWS free tier to explore this feature. It is necessary to have the following installed on your workstation:

Configuring AWS CLI

To set up your AWS CLI, you need to run the “aws configure” command in your command prompt. This will prompt you for the below information:

  • Access Key ID
  • Secret access key
  • AWS Region — identifies the AWS Region whose servers you want to send your requests to by default
  • Output format — how results are formatted. Possible values are json (default), yaml, yaml-stream, text and table.

Your AWS administrator would have provided you with the Access key ID and secret access key. Otherwise, you can create the access key under the Security credentials tab under your IAM user profile.

 

 

Pushing customized Docker image to Amazon ECR

Assuming you have configured your AWS CLI with your AWS access key ID and secret access key, you can push your custom image onto the Amazon ECR.

Follow the steps below to do so:

1 — Search for ECR under AWS services.

2 — Create a repository under the Amazon ECR. In our example, we keep the repository private and name the repository “Atoti”.

 

 

3 — Select the repository created and click on “View push commands”.

4 — Follow the push commands on the AWS CLI to push the image.

 

You can access the image on AWS with the image URI highlighted below:

 

 

With the image URI, you can deploy the image container anywhere on AWS. For instance, we can define our Docker image in the Task definition of Amazon Elastic Container Service (ECS) using the image URI from our repository in Amazon ECR:

 

 

You might also be interested in…

In case you would like to try customizing a Docker image, check out our previous article — A starter kit to dockerize a Business Intelligence Project.

 

Join our Community

Join our thriving article community and start sharing your insights today!

Like this post? Please share

Latest Articles

View all

Retail Banking Analytics with Atoti

Make smarter decisions by analyzing consumer credit cards and risk profiles. Retail banking, otherwise known as consumer...

Putting Python Code in Production

Python is great for research, but can you really use it for production quality projects? Python, once...

Changes ahead: Atoti Server 6.0-springboot3

ActiveViam is upgrading version 6.0 of Atoti Server from Spring Boot 2 to Spring Boot 3 to...
Documentation
Information
Follow Us

Atoti Free Community Edition is developed and brought to you by ActiveViam. Learn more about ActiveViam at activeviam.com

Follow Us