{"id":26109495,"url":"https://github.com/dyrnq/mrc","last_synced_at":"2026-04-24T07:33:26.964Z","repository":{"id":254241473,"uuid":"845869341","full_name":"dyrnq/mrc","owner":"dyrnq","description":"Multi-registry cache for Docker/containerd, optimizing image pulls using the original registry image","archived":false,"fork":false,"pushed_at":"2026-01-11T01:49:00.000Z","size":20,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-11T09:25:54.257Z","etag":null,"topics":["distribution","docker","docker-hub-cache","docker-hub-proxy","docker-oci","docker-proxy","docker-registry","docker-registry-cache","docker-registry-mirrors","docker-registry-proxy","docker-registry-v2","multi-registry-cache","oci","oci-specification"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/dyrnq/mrc","language":"Shell","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/dyrnq.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":"2024-08-22T04:51:34.000Z","updated_at":"2026-01-11T01:49:29.000Z","dependencies_parsed_at":"2025-03-09T23:11:25.312Z","dependency_job_id":"92f297d4-6210-4fc7-a6d2-663a0126004a","html_url":"https://github.com/dyrnq/mrc","commit_stats":null,"previous_names":["dyrnq/multi-registry-cache","dyrnq/mrc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dyrnq/mrc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyrnq%2Fmrc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyrnq%2Fmrc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyrnq%2Fmrc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyrnq%2Fmrc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dyrnq","download_url":"https://codeload.github.com/dyrnq/mrc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyrnq%2Fmrc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32214415,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T03:15:14.334Z","status":"ssl_error","status_checked_at":"2026-04-24T03:15:11.608Z","response_time":64,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["distribution","docker","docker-hub-cache","docker-hub-proxy","docker-oci","docker-proxy","docker-registry","docker-registry-cache","docker-registry-mirrors","docker-registry-proxy","docker-registry-v2","multi-registry-cache","oci","oci-specification"],"created_at":"2025-03-09T23:11:14.634Z","updated_at":"2026-04-24T07:33:26.956Z","avatar_url":"https://github.com/dyrnq.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# multi-registry-cache\n\n\nInspired by [obeone/multi-registry-cache](https://github.com/obeone/multi-registry-cache) and [archef2000/rathole-docker](https://github.com/archef2000/rathole-docker/blob/main/entrypoint.sh)\n\n## feature\n\n- multi-registry\n- all in one container(supervisord run 1)\n- run user 1000\n- volume persistence /data\n- built-in redis\n- built-in distribution \u003chttps://github.com/distribution/distribution\u003e\n\n\nsee [Dockerfile](https://github.com/dyrnq/mrc/blob/main/Dockerfile)\n\n## usage\n\neg.\n\n```bash\nmkdir -p $HOME/mrc_data\nREG_ENV=\"HTTP_PROXY=\\\"http://192.168.1.100:9119\\\",HTTPS_PROXY=\\\"http://192.168.1.100:9119\\\",NO_PROXY=\\\"127.0.0.1,localhost\\\"\"\ndocker run -d \\\n--name mrc \\\n--restart always \\\n--env REG_NAME_0=\"docker.io\" \\\n--env REG_PORT_0=\"5000\" \\\n--env REG_PROXY_REMOTEURL_0=\"https://registry-1.docker.io\" \\\n--env REG_REDIS_ADDR_0=\"127.0.0.1:6379\" \\\n--env REG_REDIS_DB_0=\"0\" \\\n--env REG_ENV_0=\"${REG_ENV}\" \\\n--env REG_NAME_1=\"registry.k8s.io\" \\\n--env REG_PORT_1=\"5001\" \\\n--env REG_PROXY_REMOTEURL_1=\"https://registry.k8s.io\" \\\n--env REG_REDIS_ADDR_1=\"127.0.0.1:6379\" \\\n--env REG_REDIS_DB_1=\"1\" \\\n--env REG_ENV_1=\"${REG_ENV}\" \\\n--env REG_NAME_2=\"k8s.gcr.io\" \\\n--env REG_PORT_2=\"5002\" \\\n--env REG_PROXY_REMOTEURL_2=\"https://k8s.gcr.io\" \\\n--env REG_REDIS_ADDR_2=\"127.0.0.1:6379\" \\\n--env REG_REDIS_DB_2=\"2\" \\\n--env REG_ENV_2=\"${REG_ENV}\" \\\n--env REG_NAME_3=\"gcr.io\" \\\n--env REG_PORT_3=\"5003\" \\\n--env REG_PROXY_REMOTEURL_3=\"https://gcr.io\" \\\n--env REG_REDIS_ADDR_3=\"127.0.0.1:6379\" \\\n--env REG_REDIS_DB_3=\"3\" \\\n--env REG_ENV_3=\"${REG_ENV}\" \\\n-p 5000:5000 \\\n-p 5001:5001 \\\n-p 5002:5002 \\\n-p 5003:5003 \\\n-v $HOME/mrc_data:/data \\\ndyrnq/mrc:latest\n\n\n## docker pull registry.k8s.io/kube-apiserver:v1.29.0\ndocker pull 127.0.0.1:5001/kube-apiserver:v1.29.0\n\n## docker pull k8s.gcr.io/pause:3.3\ndocker pull 127.0.0.1:5002/pause:3.3\n\n## docker pull gcr.io/cadvisor/cadvisor\ndocker pull 127.0.0.1:5003/cadvisor/cadvisor\n\n```\n\n```bash\npstree -lsa\nsupervisord /usr/bin/supervisord --nodaemon --configuration /etc/supervisord.conf\n  ├─redis-server\n  │   └─5*[{redis-server}]\n  ├─registry serve /etc/distribution/docker.io/config.yml\n  │   └─8*[{registry}]\n  ├─registry serve /etc/distribution/k8s.gcr.io/config.yml\n  │   └─9*[{registry}]\n  └─registry serve /etc/distribution/registry.k8s.io/config.yml\n      └─10*[{registry}]\n\n\nroot@34b4b2dec8a3:/# tree -L 2 /data/\n/data/\n├── redis\n│   ├── data\n│   ├── log\n│   └── redis.conf\n└── registry\n    ├── docker.io\n    ├── k8s.gcr.io\n    └── registry.k8s.io\n\nroot@34b4b2dec8a3:/# tree /etc/supervisor/conf.d/\n/etc/supervisor/conf.d/\n├── redis-server.ini\n├── reg-docker.io.ini\n├── reg-k8s.gcr.io.ini\n└── reg-registry.k8s.io.ini\n\n1 directory, 4 files\n```\n\nenvs description\n\n0~15 because redis defaults to 16 databases, use `REDIS_DATABASES` env , eg. `--env REDIS_DATABASES=32`.\n\n| name                           | description       | default            | required |\n|--------------------------------|-------------------|--------------------|----------|\n| REG_NAME_                      | name              |                    | y        |\n| REG_PORT_                      | port              |                    | y        |\n| REG_PROXY_REMOTEURL_           | proxy remoteurl   |                    | y        |\n| REG_PROXY_USERNAME_            | proxy username    |                    | n        |\n| REG_PROXY_PASSWORD_            | proxy password    |                    | n        |\n| REG_PROXY_TTL_                 | proxy ttl         | 168h               | n        |\n| REG_REDIS_ADDR_                | redis addr        |                    | y        |\n| REG_REDIS_PASSWORD_            | redis password    |                    | n        |\n| REG_LOG_LEVEL_                 | log level         | info               | n        |\n| REG_ENV_                       | distribution env  |                    | n        |\n| REG_STORAGE_                   | storage           | filesystem         | y        |\n| REG_STORAGE_REDIRECT_DISABLE_  | redirect disable  | true               | n        |\n| REG_STORAGE_S3_ACCESSKEY_      | s3 accesskey      |                    | y(s3)    |\n| REG_STORAGE_S3_SECRETKEY_      | s3 secretkey      |                    | y(s3)    |\n| REG_STORAGE_S3_REGIONENDPOINT_ | s3 regionendpoint |                    | y(s3)    |\n| REG_STORAGE_S3_REGION_         | s3 region         | us-east-1          | n(s3)    |\n| REG_STORAGE_S3_BUCKET_         | s3 bucket         |                    | y(s3)    |\n| REG_STORAGE_S3_ROOTDIRECTORY_  | s3 rootdirectory  | /registry/${!name} | n(s3)    |\n| REG_STORAGE_S3_FORCEPATHSTYLE_ | s3 forcepathstyle | true               | n(s3)    |\n| REDIS_DATABASES                | redis databases   | 16                 | n        |\n| OTEL_TRACES_EXPORTER           |                   |                    | n        |\n\n\n\n## mirrors\n\n### docker\n\n```bash\ncat /etc/docker/daemon.json \n{    \n    \"registry-mirrors\": [ \"http://127.0.0.1:5000\" ]\n}\n\n```\n\nref\n\n- \u003chttps://docs.docker.com/docker-hub/mirror/#configure-the-docker-daemon\u003e\n\n### containerd\n\n```bash\nmkdir -p /etc/containerd/certs.d/registry.k8s.io\ncat \u003e /etc/containerd/certs.d/registry.k8s.io/hosts.toml\u003c\u003cEOF\nserver = \"https://registry.k8s.io\"\n[host.\"http://127.0.0.1:5001\"]\n  capabilities = [\"pull\",\"resolve\"]\n  skip_verify = true\n[host.\"https://k8s.m.daocloud.io\"]\n  capabilities = [\"pull\",\"resolve\"]\n[host.\"https://registry.k8s.io\"]\n  capabilities = [\"pull\",\"resolve\",\"push\"]\nEOF\n```\n\nref\n\n- \u003chttps://github.com/containerd/containerd/blob/main/docs/cri/config.md#registry-configuration\u003e\n- \u003chttps://github.com/containerd/containerd/blob/main/docs/hosts.md\u003e\n- \u003chttps://github.com/containerd/containerd/blob/main/docs/cri/registry.md\u003e\n\n## ref\n\n- \u003chttps://github.com/distribution/distribution\u003e\n- \u003chttps://github.com/dyrnq/mrc\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyrnq%2Fmrc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdyrnq%2Fmrc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyrnq%2Fmrc/lists"}