Skip to content

Commit 4999a52

Browse files
committed
revamp ecr
1 parent 5190ecc commit 4999a52

File tree

1 file changed

+21
-22
lines changed
  • src/content/docs/aws/services

1 file changed

+21
-22
lines changed

src/content/docs/aws/services/ecr.md

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
title: "Elastic Container Registry (ECR)"
3-
linkTitle: "Elastic Container Registry (ECR)"
43
description: Get started with Elastic Container Registry (ECR) on LocalStack
54
tags: ["Base"]
65
persistence: supported
@@ -13,7 +12,7 @@ ECR enables you to store, manage, and deploy Docker container images to build, s
1312
ECR integrates with other AWS services, such as Lambda, ECS, and EKS.
1413

1514
LocalStack allows you to use the ECR APIs in your local environment to build & push Docker images to a local ECR registry.
16-
The supported APIs are available on our [API coverage page]({{< ref "coverage_ecr" >}}), which provides information on the extent of ECR's integration with LocalStack.
15+
The supported APIs are available on our [API coverage page](), which provides information on the extent of ECR's integration with LocalStack.
1716

1817
## Getting started
1918

@@ -53,15 +52,15 @@ CMD /root/run_apache.sh
5352

5453
You can now build the Docker image from the `Dockerfile` using the `docker CLI:
5554

56-
{{< command >}}
57-
$ docker build -t localstack-ecr-image .
58-
{{< / command >}}
55+
```bash
56+
docker build -t localstack-ecr-image .
57+
```
5958

6059
You can run the following command to verify that the image was built successfully:
6160

62-
{{< command >}}
63-
$ docker images
64-
{{< / command >}}
61+
```bash
62+
docker images
63+
```
6564

6665
You will see output similar to the following:
6766

@@ -77,15 +76,15 @@ To push the Docker image to ECR, you first need to create a repository.
7776
You can create an ECR repository using the [`CreateRepository`](https://docs.aws.amazon.com/AmazonECR/latest/APIReference/API_CreateRepository.html) API.
7877
Run the following command to create a repository named `localstack-ecr-repository`:
7978

80-
{{< command >}}
81-
$ awslocal ecr create-repository \
79+
```bash
80+
awslocal ecr create-repository \
8281
--repository-name localstack-ecr-repository \
8382
--image-scanning-configuration scanOnPush=true
84-
{{< / command >}}
83+
```
8584

8685
You will see an output similar to the following:
8786

88-
```sh
87+
```bash
8988
{
9089
"repository": {
9190
"repositoryArn": "arn:aws:ecr:us-east-1:000000000000:repository/localstack-ecr-repository",
@@ -111,22 +110,22 @@ You will need the `repositoryUri` value to push the Docker image to the reposito
111110
To push the Docker image to the repository, you first need to tag the image with the `repositoryUri`.
112111
Run the following command to tag the image:
113112

114-
{{< command >}}
115-
$ docker tag localstack-ecr-image 000000000000.dkr.ecr.us-east-1.localhost.localstack.cloud:4566/localstack-ecr-repository
116-
{{< / command >}}
113+
```bash
114+
docker tag localstack-ecr-image 000000000000.dkr.ecr.us-east-1.localhost.localstack.cloud:4566/localstack-ecr-repository
115+
```
117116

118117
You can now push the image to the repository using the `docker` CLI:
119118

120-
{{< command >}}
121-
$ docker push 000000000000.dkr.ecr.us-east-1.localhost.localstack.cloud:4566/localstack-ecr-repository
122-
{{< / command >}}
119+
```bash
120+
docker push 000000000000.dkr.ecr.us-east-1.localhost.localstack.cloud:4566/localstack-ecr-repository
121+
```
123122

124123
The image will take a few seconds to push to the repository.
125124
You can run the following command to verify that the image was pushed successfully:
126125

127-
{{< command >}}
128-
$ awslocal ecr list-images --repository-name localstack-ecr-repository
129-
{{< / command >}}
126+
```bash
127+
awslocal ecr list-images --repository-name localstack-ecr-repository
128+
```
130129

131130
You will see an output similar to the following:
132131

@@ -146,7 +145,7 @@ You will see an output similar to the following:
146145
The LocalStack Web Application provides a Resource Browser for managing ECR repositories and images.
147146
You can access the Resource Browser by opening the LocalStack Web Application in your browser, navigating to the **Resources** section, and then clicking on **ECR** under the **Compute** section.
148147

149-
<img src="ecr-resource-browser.png" alt="ECR Resource Browser" title="ECR Resource Browser" width="900" />
148+
![ECR Resource Browser](/images/aws/ecr-resource-browser.png)
150149

151150
The Resource Browser allows you to perform the following actions:
152151

0 commit comments

Comments
 (0)