Skip to content
Merged
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions pages/common/aws-ecr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# aws ecr

> Push, pull, and manage container images.
> More information: <https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecr/index.html>.

- Authenticate Docker with your default registry (username is AWS):
Comment thread
258204 marked this conversation as resolved.
Outdated

`aws ecr get-login-password --region {{region}} | {{docker login}} --username AWS --password-stdin {{aws_account_id}}.dkr.ecr.{{region}}.amazonaws.com`
Comment thread
bl-ue marked this conversation as resolved.

- Create a repository:

`aws ecr create-repository --repository-name {{repo_name}} --image-scanning-configuration scanOnPush={{true|false}} --region {{region}}`
Comment thread
258204 marked this conversation as resolved.
Outdated

- Tag a local image for ECR:

`docker tag {{container_name:latest}} {{aws_account_id}}.dkr.ecr.{{region}}.amazonaws.com/{{container_name:latest}}`
Comment thread
258204 marked this conversation as resolved.
Outdated

- Push an image to a repository:

`docker push {{aws_account_id}}.dkr.ecr.{{region}}.amazonaws.com/{{container_name:latest}}`
Comment thread
258204 marked this conversation as resolved.
Outdated

- Pull an image from a repository:

`docker pull {{aws_account_id}}.dkr.ecr.{{region}}.amazonaws.com/{{container_name:latest}}`
Comment thread
258204 marked this conversation as resolved.
Outdated

- Delete an image from a repository:

`aws ecr batch-delete-image --repository-name {{repo_name}} --image-ids imageTag={{latest}}`
Comment thread
258204 marked this conversation as resolved.
Outdated

- Delete a repository:

`aws ecr delete-repository --repository-name {{repo_name}} --force`
Comment thread
258204 marked this conversation as resolved.
Outdated

- List images in a repository:
Comment thread
bl-ue marked this conversation as resolved.
Outdated

`aws ecr list-images --repository-name {{repo_name}}`
Comment thread
258204 marked this conversation as resolved.
Outdated