{"id":28740928,"url":"https://github.com/aliyuncontainerservice/sync-repo","last_synced_at":"2025-06-16T07:09:36.190Z","repository":{"id":81541883,"uuid":"143129379","full_name":"AliyunContainerService/sync-repo","owner":"AliyunContainerService","description":"Synchronize images from gcr.io, quay.io and Docker Hub to your Docker registry","archived":false,"fork":false,"pushed_at":"2020-09-02T10:27:49.000Z","size":25,"stargazers_count":82,"open_issues_count":5,"forks_count":29,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-07T06:35:36.982Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AliyunContainerService.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-01T08:49:03.000Z","updated_at":"2024-05-01T05:53:47.000Z","dependencies_parsed_at":"2023-03-02T10:30:09.420Z","dependency_job_id":null,"html_url":"https://github.com/AliyunContainerService/sync-repo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AliyunContainerService/sync-repo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliyunContainerService%2Fsync-repo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliyunContainerService%2Fsync-repo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliyunContainerService%2Fsync-repo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliyunContainerService%2Fsync-repo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AliyunContainerService","download_url":"https://codeload.github.com/AliyunContainerService/sync-repo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliyunContainerService%2Fsync-repo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260116644,"owners_count":22961065,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-16T07:09:35.665Z","updated_at":"2025-06-16T07:09:36.176Z","avatar_url":"https://github.com/AliyunContainerService.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Docker Registry Synchronizer\n\nThis helper project will synchronize Docker image from popular public Docker Registry services to your own registry.\n\n* Support gcr.io, quay.io and Docker Hub\n* Support public source image from above registry services only\n* Sync the tagged images from given repo updated within 15 days (default)\n\n\nNOTE: The project supports both Python2 and Python3\n\n### Prerequisite\n\n```\npip install docker[tls]\npip install python-dateutil\n```\n\n### Editing image lists\nEdit the images.txt of the image repositories for syncing\n\n```\nquay.io/coreos/prometheus-operator=registry.cn-hangzhou.aliyuncs.com/coreos_containers/prometheus-operator\ngcr.io/google_containers/pause-amd64\n\n```\n\nEach line will be one repo definition\n\n```source_repo=target_repo``` Sync the source repo to specific target repo\n\nor\n\n```source_repo``` Sync the source repo to default target repo, which is using default registry, namespace and the same name of the source repo.\n\nIn 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](https://help.aliyun.com/document_detail/110341.html?spm=a2c4g.11186623.6.544.262e17a4ZH9dOt)\n\n```\nregistry.cn-hangzhou.aliyuncs.com/eric-dev/debug=registry.ap-southeast-1.aliyuncs.com/eric-dev/debug\n```\n\n### Usage\n\nHelp\n\n```sh\npython sync_images.py -h|--help\n```\n\nSynchronize images from the configuraiton files, by default \"images.txt\"\n\n```sh\npython sync_images.py\n```\n\nOther optional arguments\n\n\n```sh\n-f|--file \u003cimage_list_file\u003e\n-r|--registry \u003chost:port\u003e Default \"registry.cn-hangzhou.aliyuncs.com\"\n-n|--namespace \u003cnamespace\u003e Default \"google_containers\"\n-d|--days \u003cdays\u003e Default 15\n```\n\n### Remove out-of-date images\n\nYou can run the following command to remove the images created more than 30 days (720h) ago:\n\n```sh\ndocker image prune -a --force --filter \"until=720h\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliyuncontainerservice%2Fsync-repo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faliyuncontainerservice%2Fsync-repo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliyuncontainerservice%2Fsync-repo/lists"}