Mirror public Docker images to private ECR repositories
Project description
Docker ECR Mirror
Mirror public docker images to ECR, automagically. This requires Skopeo to be installed.
pip install ecr-mirror
Usage
$ ecr-mirror
Usage: ecr-mirror [OPTIONS] COMMAND [ARGS]...
Options:
--registry-id TEXT The registry ID. This is usually your AWS account ID.
--role-arn TEXT Assume a specific role to push to AWS
--override-os TEXT Specify the OS of images, default to "linux"
--override-arch TEXT Specify the ARCH of images, default to "amd64". If set
to "all" - all architectures will be synced
--help Show this message and exit.
Commands:
copy Copy all tags that match a given glob expression into ECR
list-repos List all repositories that will be synced
sync Copy public images to ECR using ECR tags
Create an ECR repository with the following two tags set:
upstream-image
set to a public Docker hub image, i.enginx
oristio/proxyv2
upstream-tags
set to a/
-separated list of tag globs, i.e1.6.*
or just1.2-alpine
. ECR does not allow the use of the*
character in tag values, so you should use+
as a replacement.ignore-tags
set to a/
-separated list of tag globs to ignore. ECR does not allow the use of the*
character in tag values, so you should use+
as a replacement.
Terraform example:
resource "aws_ecr_repository" "repo" {
name = "nginx"
tags = {
upstream-image = "nginx",
// Mirror 1.16* and 1.17*
upstream-tags = "1.16+/1.17+"
ignore-tags = "+-gpu"
}
}
Running ecr-mirror sync
will begin concurrently fetching all images and pushing them to ECR.
You can run ecr-mirror list
to see all repositories that will be mirrored.
You can also manually copy specific image patterns using ecr-mirror copy
:
ecr-mirror copy "istio/proxyv2:1.6.*" ACCOUNT_ID.dkr.ecr.eu-west-1.amazonaws.com/istio-proxyv2
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ecr_mirror-1.3.0.tar.gz
.
File metadata
- Download URL: ecr_mirror-1.3.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.11.0 Darwin/22.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac8ccb5411ebacd97d74b29f4255465a0e9abe12f34dab2b87ce865e99577bd7 |
|
MD5 | 595305f619e75fc29a0dbf77b774a2c3 |
|
BLAKE2b-256 | d460022bf281f63b07f7bdae5fcaccc356e719201ee0e864a67a9eb958584e05 |
File details
Details for the file ecr_mirror-1.3.0-py3-none-any.whl
.
File metadata
- Download URL: ecr_mirror-1.3.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.11.0 Darwin/22.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86a7985851c3d64a8c9f171f2aca2a1adf3e4ba7c7c5fde39a14716018795a1b |
|
MD5 | 640c94620935f599fd24f533e300c84d |
|
BLAKE2b-256 | 3b712218b36e0df1d2b12f91f58b0bd31ed8719c47bbb85468b3adb50e2e6695 |