caching git clone/pull/fetch with highest compression and nightly git gc.
1.2K
A docker image for caching git clone/pull based on jonasmalacofilho/git-cache-http-server, with
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).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.git gc process and the gc thread that account for monitoring and spawning git gc process is limited by:
SCHED_BATCH scheduler.NOTE:
The time inside container maybe is different from your host due to different timezone.
Simply run docker pull nobodyxu/git-cache.
Just run make to build it.
Optionally, you can run the docker image from NobodyXu/apt-cache to enable apt-cache.
The 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.
After building the image, type make run to run the container, which also creates a volume for storing cache and publish a port on 8080.
To use the cache, simply run
git config --global url."http://$HOST_IP:$PORT_NUMBER/".insteadOf https://
in the container or on other machines.
If 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 as possible.
Content type
Image
Digest
Size
163.5 MB
Last updated
about 7 years ago
docker pull nobodyxu/git-cache