将公共Docker映像镜像到私有ECR存储库
ecr-mirror的Python项目详细描述
Docker ECR镜子
自动将公共docker映像镜像到ECR。这需要安装Skopeo。在
pip install ecr-mirror
使用
$ 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
--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
使用以下两个标记集创建ECR存储库:
upstream-image
设置为公共Docker集线器映像,即nginx
或{} upstream-tags
设置为/
分隔的标记globs,即1.6.*
或仅1.2-alpine
。ECR不允许 在标记值中使用*
字符,因此应该使用+
作为替换。在
地形示例:
^{pr2}$运行ecr-mirror sync
将同时获取所有图像并将它们推送到ECR。在
{cd12>你可以看到所有的存储库。在
您也可以使用ecr-mirror copy
手动复制特定的图像模式:
ecr-mirror copy "istio/proxyv2:1.6.*" ACCOUNT_ID.dkr.ecr.eu-west-1.amazonaws.com/istio-proxyv2
- 项目
标签: