mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
chore(kb): add notes about docker image creation in gitlab runners
This commit is contained in:
@@ -10,6 +10,11 @@
|
||||
```sh
|
||||
# List and get information about the repositories in ECRs.
|
||||
aws ecr describe-repositories
|
||||
aws ecr describe-repositories --repository-names 'docker-tools/image-builder'
|
||||
aws ecr describe-repositories --registry-id '123456789012' --query 'repositories[].repositoryName'
|
||||
|
||||
# Create repositories.
|
||||
aws ecr create-repository --repository-name 'docker-tools/image-builder'
|
||||
|
||||
# List images in ECRs.
|
||||
aws ecr list-images --repository-name 'repository'
|
||||
@@ -21,7 +26,7 @@ aws ecr get-login-password \
|
||||
| docker login --username 'AWS' --password-stdin 'aws_account_id.dkr.ecr.region.amazonaws.com' \
|
||||
|
||||
# Pull images from ECRs.
|
||||
docker 'pull aws_account_id.dkr.ecr.region.amazonaws.com/repository_name/image_name:tag'
|
||||
docker pull 'aws_account_id.dkr.ecr.region.amazonaws.com/repository_name/image_name:tag'
|
||||
|
||||
|
||||
# List and show pull through cache rules.
|
||||
@@ -52,6 +57,11 @@ docker pull '123456789012.dkr.ecr.eu-south-1.amazonaws.com/docker-hub/library/ng
|
||||
docker pull '123456789012.dkr.ecr.us-west-2.amazonaws.com/docker-hub/grafana/grafana'
|
||||
```
|
||||
|
||||
```sh
|
||||
aws ecr describe-repositories --repository-names 'docker-tools/image-builder' \
|
||||
|| aws ecr create-repository --repository-name 'docker-tools/image-builder'
|
||||
```
|
||||
|
||||
## Pull through cache feature
|
||||
|
||||
> **Note:** when requesting an image for the first time using the pull through cache, the ECR creates a new repository for that image.<br>
|
||||
|
||||
Reference in New Issue
Block a user