Name | ecr-mirror JSON |
Version |
1.3.0
JSON |
| download |
home_page | |
Summary | Mirror public Docker images to private ECR repositories |
upload_time | 2022-12-12 11:33:07 |
maintainer | |
docs_url | None |
author | Tom Forbes |
requires_python | >=3.7,<4.0 |
license | MIT |
keywords |
docker
ecr
mirror
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Docker ECR Mirror
![](https://img.shields.io/pypi/v/ecr-mirror.svg)
![](https://img.shields.io/pypi/l/ecr-mirror.svg)
![](https://img.shields.io/pypi/pyversions/ecr-mirror.svg)
Mirror public docker images to ECR, automagically. This requires [Skopeo](https://github.com/containers/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.e `nginx` or `istio/proxyv2`
* `upstream-tags` set to a `/`-separated list of tag **globs**, i.e `1.6.*` or just `1.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:
```hcl
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`
Raw data
{
"_id": null,
"home_page": "",
"name": "ecr-mirror",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7,<4.0",
"maintainer_email": "",
"keywords": "docker,ecr,mirror",
"author": "Tom Forbes",
"author_email": "tom.forbes@onfido.com",
"download_url": "https://files.pythonhosted.org/packages/d4/60/022bf281f63b07f7bdae5fcaccc356e719201ee0e864a67a9eb958584e05/ecr_mirror-1.3.0.tar.gz",
"platform": null,
"description": "# Docker ECR Mirror\n\n![](https://img.shields.io/pypi/v/ecr-mirror.svg)\n![](https://img.shields.io/pypi/l/ecr-mirror.svg)\n![](https://img.shields.io/pypi/pyversions/ecr-mirror.svg)\n\nMirror public docker images to ECR, automagically. This requires [Skopeo](https://github.com/containers/skopeo) to be installed.\n\n`pip install ecr-mirror`\n\n## Usage\n\n```\n$ ecr-mirror\nUsage: ecr-mirror [OPTIONS] COMMAND [ARGS]...\n\nOptions:\n --registry-id TEXT The registry ID. This is usually your AWS account ID.\n --role-arn TEXT Assume a specific role to push to AWS\n --override-os TEXT Specify the OS of images, default to \"linux\"\n --override-arch TEXT Specify the ARCH of images, default to \"amd64\". If set\n to \"all\" - all architectures will be synced\n\n --help Show this message and exit.\n\nCommands:\n copy Copy all tags that match a given glob expression into ECR\n list-repos List all repositories that will be synced\n sync Copy public images to ECR using ECR tags\n```\n\nCreate an ECR repository with the following two tags set:\n\n* `upstream-image` set to a public Docker hub image, i.e `nginx` or `istio/proxyv2`\n* `upstream-tags` set to a `/`-separated list of tag **globs**, i.e `1.6.*` or just `1.2-alpine`. ECR does not allow the\n use of the `*` character in tag values, so you should use `+` as a replacement.\n* `ignore-tags` set to a `/`-separated list of tag **globs** to ignore. ECR does not allow the\n use of the `*` character in tag values, so you should use `+` as a replacement.\n\nTerraform example:\n\n```hcl\nresource \"aws_ecr_repository\" \"repo\" {\n name = \"nginx\"\n tags = {\n upstream-image = \"nginx\",\n // Mirror 1.16* and 1.17*\n upstream-tags = \"1.16+/1.17+\"\n ignore-tags = \"+-gpu\"\n }\n}\n```\n\nRunning `ecr-mirror sync` will begin concurrently fetching all images and pushing them to ECR.\n\nYou can run `ecr-mirror list` to see all repositories that will be mirrored.\n\nYou can also manually copy specific image patterns using `ecr-mirror copy`:\n\n`ecr-mirror copy \"istio/proxyv2:1.6.*\" ACCOUNT_ID.dkr.ecr.eu-west-1.amazonaws.com/istio-proxyv2`\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Mirror public Docker images to private ECR repositories",
"version": "1.3.0",
"split_keywords": [
"docker",
"ecr",
"mirror"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "640c94620935f599fd24f533e300c84d",
"sha256": "86a7985851c3d64a8c9f171f2aca2a1adf3e4ba7c7c5fde39a14716018795a1b"
},
"downloads": -1,
"filename": "ecr_mirror-1.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "640c94620935f599fd24f533e300c84d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7,<4.0",
"size": 5060,
"upload_time": "2022-12-12T11:33:05",
"upload_time_iso_8601": "2022-12-12T11:33:05.782756Z",
"url": "https://files.pythonhosted.org/packages/3b/71/2218b36e0df1d2b12f91f58b0bd31ed8719c47bbb85468b3adb50e2e6695/ecr_mirror-1.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "595305f619e75fc29a0dbf77b774a2c3",
"sha256": "ac8ccb5411ebacd97d74b29f4255465a0e9abe12f34dab2b87ce865e99577bd7"
},
"downloads": -1,
"filename": "ecr_mirror-1.3.0.tar.gz",
"has_sig": false,
"md5_digest": "595305f619e75fc29a0dbf77b774a2c3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7,<4.0",
"size": 4725,
"upload_time": "2022-12-12T11:33:07",
"upload_time_iso_8601": "2022-12-12T11:33:07.357956Z",
"url": "https://files.pythonhosted.org/packages/d4/60/022bf281f63b07f7bdae5fcaccc356e719201ee0e864a67a9eb958584e05/ecr_mirror-1.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-12 11:33:07",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "ecr-mirror"
}