Docker ECR Sync
Mirror public docker images to ECR, automagically. This requires Skopeo to be installed.
pip install ecr-mirror
Usage
$ ecr-sync
Usage: ecr-sync [OPTIONS] COMMAND [ARGS]...
Options:
--registry-id, --reg TEXT The registry ID. This is usually your AWS
account ID. [required]
--role-name TEXT Assume a specific role to push to AWS
--override-os TEXT Specify the OS of images, default to "linux"
--override-arch [amd64|arm64|windows-amd64|all]
Specify the ARCH of images, default to
"amd64". If set to "all" - all architectures
will be synced
--profile-name TEXT The name of the AWS profile to use
--verbose Enable verbose output
--dry-run Enable dry run
--debug Enable debug output
--public Use ECR Public instead of ECR
--docker-username TEXT The username to use for docker login
--docker-password TEXT The password to use for docker login
--threads INTEGER The number of threads to use for copying
images
--help Show this message and exit.
Create an ECR repository with the following two tags set:
upstream-imageset to a public Docker hub image, i.enginxoristio/proxyv2upstream-tagsset 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.
Optional:
ignore-tagsset 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-sync sync will begin concurrently fetching matched images tags and pushing them to ECR.
You can run ecr-sync list-repos 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
Metadata
Release files for ecr_sync 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ecr_sync-2.0.0.tar.gz | 5.7 kB | Without provenance | Details for ecr_sync-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ecr_sync-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for ecr_sync-2.0.0-py3-none-any.whl |
Total release size: 12.3 kB
Release files / ecr_sync-2.0.0.tar.gz
| Download URL | ecr_sync-2.0.0.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8f34b87eb8a407ef99879a23d70b13e578f58928d30a2d9105daa051223c07e
|
|
BLAKE2b-256 checksum How to use checksums |
561936bd9148a72df8bdfc19e98c681cf935219d104252e6cde32c108d706f2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.12.2 Darwin/23.3.0
|
Release files / ecr_sync-2.0.0-py3-none-any.whl
| Download URL | ecr_sync-2.0.0-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8248bcfc9f3e4a525528c1cb6adf57883e95590e1caf3a3174fa7bbc85232381
|
|
BLAKE2b-256 checksum How to use checksums |
2b5ae6e328d995c14a704667cdeda4ed1d4bdac2e82f037a33c9f89f3e60f190
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.12.2 Darwin/23.3.0
|
Security for ecr_sync 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.