3 Star 0 Fork 0

AliyunContainerService / sync-repo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Docker Registry Synchronizer

This helper project will synchronize Docker image from popular public Docker Registry services to your own registry.

  • Support gcr.io, quay.io and Docker Hub
  • Support public source image from above registry services only
  • Sync the tagged images from given repo updated within 15 days (default)

Prequesite

pip install docker
pip install python-dateutil
pip install requests[security]

Editing image lists

Edit the images.txt of the image repositories for syncing

quay.io/coreos/prometheus-operator=registry.cn-hangzhou.aliyuncs.com/coreos_containers/prometheus-operator
gcr.io/google_containers/pause-amd64

Each line will be one repo definition

source_repo=target_repo Sync the source repo to specific target repo

or

source_repo Sync the source repo to default target repo, which is using default registry, namespace and the same name of the source repo.

In case to sync private repos of aliyun registry cross regions, you have to configure your aliyun cli before you get start, pls refer to aliyun-cli

registry.cn-hangzhou.aliyuncs.com/eric-dev/debug=registry.ap-southeast-1.aliyuncs.com/eric-dev/debug

Usage

Help

python sync_images.py -h|--help

Synchronize images from the configuraiton files, by default "images.txt"

python sync_images.py

Other optional arguments

-f|--file <image_list_file>
-r|--registry <host:port> Default "registry.cn-hangzhou.aliyuncs.com"
-n|--namespace <namespace> Default "google_containers"
-d|--days <days> Default 15

Remove out-of-date images

You can run the following command to remove the images created more than 30 days (720h) ago:

docker image prune -a --force --filter "until=720h"

空文件

简介

Docker Registry Synchronizer 展开 收起
Python
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Python
1
https://gitee.com/AliyunContainerService/sync-repo.git
git@gitee.com:AliyunContainerService/sync-repo.git
AliyunContainerService
sync-repo
sync-repo
master

搜索帮助