{"id":18350221,"url":"https://github.com/zakame/docker-registry-compose","last_synced_at":"2025-04-09T23:50:40.430Z","repository":{"id":137719547,"uuid":"115177808","full_name":"zakame/docker-registry-compose","owner":"zakame","description":"Docker Registry: Hub Mirror and Local Private","archived":false,"fork":false,"pushed_at":"2018-02-05T04:38:17.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T23:50:37.843Z","etag":null,"topics":["docker-compose","docker-registry"],"latest_commit_sha":null,"homepage":null,"language":null,"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/zakame.png","metadata":{"files":{"readme":"README.org","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":"2017-12-23T07:07:22.000Z","updated_at":"2021-01-18T09:49:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"98a1a796-8762-45dd-87ae-27a5470c7f49","html_url":"https://github.com/zakame/docker-registry-compose","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakame%2Fdocker-registry-compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakame%2Fdocker-registry-compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakame%2Fdocker-registry-compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zakame%2Fdocker-registry-compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zakame","download_url":"https://codeload.github.com/zakame/docker-registry-compose/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248131454,"owners_count":21052819,"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":["docker-compose","docker-registry"],"created_at":"2024-11-05T21:25:41.689Z","updated_at":"2025-04-09T23:50:40.399Z","avatar_url":"https://github.com/zakame.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"#+TITLE: Docker Registry -- Hub Mirror and Local Private\n\n* About\n\n  This is a simple Docker Compose system that lets one run 2 Docker\n  Registries on the same system:\n\n  - A Registry acting as a mirror for the Docker Hub\n  - A Registry for private images, meant for local development and\n    sharing between Docker hosts (including localhost as well as Docker\n    Machines and Minikube)\n\n* How to use\n\n  Launch this just like any Compose system:\n\n  #+BEGIN_SRC sh\n  docker-compose up -d\n  #+END_SRC\n\n  Then, update your Docker host's =dockerd= configuration to run with the\n  =--registry-mirror= and =--insecure-registry= options.  For example, on\n  systems using =/etc/default/docker= for configuration:\n\n  #+BEGIN_SRC sh\n  # on systems using /etc/default/docker\n  DOCKER_OPTS=\"--registry-mirror=http://127.0.0.1:50000 --insecure-registry=192.168.42.1:50001\"\n  #+END_SRC\n\n  And for systems using =/etc/docker/daemon.json=:\n\n  #+BEGIN_SRC json\n  {\n      \"insecure-registries\": [\"192.168.42.1:50001\"],\n      \"registry-mirrors\": [\"http://127.0.0.1:50000\"]\n  }\n  #+END_SRC\n\n  The containers are configured to always restart, so one just needs to\n  do this initial setup once, and it will retain across Docker host\n  reboots.\n\n* Tips \u0026 Tricks\n\n** Using the same Registries across Docker Machines\n\n   My reference setup is a 6-node Docker Machine setup that I will\n   configure into a Docker Swarm later.  Since I'm using a libvirt/KVM\n   setup where my main Docker Engine is on =192.168.122.1=, I can set up\n   my VMs like this:\n\n   #+BEGIN_SRC sh\n   for m in swarm-{manager,worker}-{1,2,3}; do\n       docker-machine create ... \\\n                      --engine-registry-mirror=http://192.168.122.1:50000 \\\n                      --engine-insecure-registry http://192.168.122.1:50001 $m\n   done\n   #+END_SRC\n\n** Using external directories for registry volumes\n\n   If you wish to use your host's directory for storing registry data\n   instead of letting Compose make a named volume for you, just change\n   the volumes settings of the registry containers.  For example:\n\n   #+BEGIN_SRC yaml\n   services:\n     registry_mirror:\n     ...\n     volumes:\n       - /my/mirror/directory:/var/lib/registry\n   #+END_SRC\n\n* See Also\n\n  - [[https://zakame.net/blog/2017/12/composing-a-docker-hub-mirror-and-private-registry.html][Zakame::Blog - Composinga Docker Hub Mirror and Private Registry]]\n  - [[https://zakame.net/blog/2017/07/mirroring-the-docker-hub.html][Zakame::Blog - Mirroring the Docker Hub]]\n\n* License\n\n  The MIT License (MIT)\n\n  Copyright (C) Zak B. Elep.\n\n  Permission is hereby granted, free of charge, to any person obtaining\n  a copy of this software and associated documentation files (the\n  \"Software\"), to deal in the Software without restriction, including\n  without limitation the rights to use, copy, modify, merge, publish,\n  distribute, sublicense, and/or sell copies of the Software, and to\n  permit persons to whom the Software is furnished to do so, subject to\n  the following conditions:\n\n  The above copyright notice and this permission notice shall be\n  included in all copies or substantial portions of the Software.\n\n  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzakame%2Fdocker-registry-compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzakame%2Fdocker-registry-compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzakame%2Fdocker-registry-compose/lists"}