{"id":15769443,"url":"https://github.com/nobodyxu/git-cache","last_synced_at":"2025-03-31T11:22:01.458Z","repository":{"id":109423715,"uuid":"198468902","full_name":"NobodyXu/git-cache","owner":"NobodyXu","description":"A docker image for caching git clone/pull with highest git compression level and nightly git gc based on jonasmalacofilho/git-cache-http-server (github).","archived":false,"fork":false,"pushed_at":"2019-08-17T00:18:16.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-25T02:17:39.080Z","etag":null,"topics":["debian-buster","docker","docker-cloud","docker-image","git","git-cache","nightly-gc","server"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NobodyXu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-07-23T16:30:26.000Z","updated_at":"2019-08-17T06:24:43.000Z","dependencies_parsed_at":"2023-04-01T10:20:07.410Z","dependency_job_id":null,"html_url":"https://github.com/NobodyXu/git-cache","commit_stats":{"total_commits":46,"total_committers":2,"mean_commits":23.0,"dds":0.08695652173913049,"last_synced_commit":"7f7981eec20bb24d456f3c2c193e2f93dde92410"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NobodyXu%2Fgit-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NobodyXu%2Fgit-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NobodyXu%2Fgit-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NobodyXu%2Fgit-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NobodyXu","download_url":"https://codeload.github.com/NobodyXu/git-cache/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246458252,"owners_count":20780725,"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":["debian-buster","docker","docker-cloud","docker-image","git","git-cache","nightly-gc","server"],"created_at":"2024-10-04T14:02:49.620Z","updated_at":"2025-03-31T11:22:01.399Z","avatar_url":"https://github.com/NobodyXu.png","language":"Shell","readme":"# git-cache\n\n![Docker Cloud Automated build](https://img.shields.io/docker/cloud/automated/nobodyxu/git-cache.svg)\n![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/nobodyxu/git-cache.svg)\n\n![MicroBadger Size (tag)](https://img.shields.io/microbadger/image-size/nobodyxu/git-cache/latest)\n\nA docker image for caching git clone/pull based on [jonasmalacofilho/git-cache-http-server][1], with\n\n 1. git compression level turned to 9.\n 2. `git gc --aggressive` run on every cached repository every night at 1:30 (can be overriden by environment variables `HOUR` and `MIN`, in 24 hour format).\n 3. After `WAIT_TIMEOUT` (default to 4 hours, can be overloaded by environment variables), no new `git gc --aggressive` process will be spawned. In the next day, gc process will start from where it was left.\n 4. The `git gc` process and the gc thread that account for monitoring and spawning `git gc` process is limited by:\n     - nice set to 19\n     - Using `SCHED_BATCH` scheduler.\n\n*NOTE*:\n\nThe time inside container maybe is *different* from your host due to different timezone.\n\n# Usage\n\n## Pull from docker hub\n\nSimply run `docker pull nobodyxu/git-cache`.\n\n## How to build\n\nJust run `make` to build it.\n\nOptionally, you can run the docker image from [NobodyXu/apt-cache][2] to enable apt-cache.\n\n### *NOTE* \n\nThe image will automatically test whether port 8000 on your machine is open, so if you run something else on 8000 that is not a squid-deb-proxy, run `env NO_APT_PROXY=true make`.\n\n## How to run\n\nAfter building the image, type `make run` to run the container, which also creates a volume for storing cache and publish a port on 8080.\n\n## How to use\n\nTo use the cache, simply run\n\n```\ngit config --global url.\"http://$HOST_IP:$PORT_NUMBER/\".insteadOf https://\n```\n\nin the container or on other machines.\n\n\nIf you have any problem using this repository or have advices on how to improve, please open a github issue and I will answer you as soon \nas possible.\n\n# Reference:\n\n 1. [jonasmalacofilho/git-cache-http-server][1]\n\n[1]: https://github.com/jonasmalacofilho/git-cache-http-server\n[2]: https://github.com/NobodyXu/apt-cache\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnobodyxu%2Fgit-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnobodyxu%2Fgit-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnobodyxu%2Fgit-cache/lists"}