# Elastic Container Registry (ECR)

Amazon Elastic Container Registry (ECR) is a fully managed Docker container registry that allows users to easily store, manage, and deploy container images within AWS. ECR integrates seamlessly with Amazon ECS, EKS, and other AWS services to provide secure and scalable container image storage. Users can push, pull, and manage container images with built-in security features like encryption at rest and access control via AWS IAM.

## Creating an ECR Repository <a href="#id-0-toc-title" id="id-0-toc-title"></a>

1. In the DuploCloud Portal, navigate to **Cloud Services** -> **Storage**.
2. Click the **ECR Repository** tab. The **ECR Repository** page displays.<br>

   <div align="left"><figure><img src="https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2Fjh14WD64263qzrqj8p23%2FL3.png?alt=media&#x26;token=efc036b9-20f6-42d3-8e5d-f3d2536edfb1" alt="" width="357"><figcaption><p>The <strong>Create an ECR Repository</strong> pane</p></figcaption></figure></div>
3. Click **Add**. The **Create an ECR Repository** page displays.
4. In the **ECR Repository Name** field, enter the ECR Repository Name.
5. Click **Create**.

## Uploading Container Images to an ECR Repository <a href="#id-0-toc-title" id="id-0-toc-title"></a>

1. Login to ECR
2. Tag the images you have built.
3. Push the images to the ECR Repository that you created.

Refer to the [AWS Documentation](https://docs.aws.amazon.com/AmazonECR/latest/userguide/docker-push-ecr-image.html) for more details about uploading Container Images.

## Updating ECR Repository settings

1. Select the Tenant from the **Tenant** list box.
2. Navigate to **Cloud Services** -> **Storage** in the DuploCloud Portal.
3. Select the **ECR Repository** tab.
4. In the row of the ECR repository you want to delete, click the menu icon (<img src="https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2F2zCpjpPJBxCltuVCLA89%2Fmenu%20icon.avif?alt=media&#x26;token=85eee83d-9971-4469-9bcd-61a43626d0fb" alt="" data-size="line">).
5. Select **Update Settings**. The **Update ECR Repository Settings** pane displays.<br>

   <div align="left"><figure><img src="https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2F2kkgwhuWhhioX0tCCsSa%2FScreenshot%20(26).png?alt=media&#x26;token=7bcef458-9240-494c-8bd2-a7c2d25c0ce8" alt="" width="401"><figcaption><p>The <strong>Update ECR Repository Settings</strong> pane</p></figcaption></figure></div>
6. Enable or disable **Image Tag Immutability** and **Scan Image On Push** settings as needed.
7. Click **Update**. The ECR settings are updated

## Deleting an ECR Repository

If you no longer need an ECR repository used for storing Lambda container images, you can delete it from DuploCloud.

1. Select the Tenant from the **Tenant** list box.
2. Navigate to **Cloud Services** -> **Storage** in the DuploCloud Portal.
3. Select the **ECR Repository** tab.
4. In the row of the ECR repository you want to delete, click the menu icon (<img src="https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2F2zCpjpPJBxCltuVCLA89%2Fmenu%20icon.avif?alt=media&#x26;token=85eee83d-9971-4469-9bcd-61a43626d0fb" alt="" data-size="line">).
5. Select **Delete** or **Force Delete**:
   * **Delete**: If the repository contains any images, you will need to manually remove them before you can delete the repository.
   * **Force Delete**: This option immediately removes the repository and all of its contents (container images) without needing to empty the repository first.

<figure><img src="https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2FxHdYko65y6yxwlTZGdVU%2FECR.png?alt=media&#x26;token=28a6e7a2-092f-4966-80dc-2e14fbe6f489" alt=""><figcaption><p>The <strong>ECR Repository</strong> tab with the <strong>Delete</strong> and <strong>Force Delete</strong> menu options highlighted</p></figcaption></figure>
