So just to close the loop on this, I ran across
https://github.com/openshift/origin/tree/master/examples/gitserver which
seems to solve this issue rather well. This provides a service which
acts as a caching proxy to the real git repo.
It doesn't work quite as documented due to OpenShift's security
restrictions (https://github.com/openshift/origin/issues/18912), but a
manual build of the Docker image with a few tweaks and it works.

-Patrick

On 2018/3/6 14:07, Patrick Hemmer wrote:
> Is there a way to implement some sort of git cache when building images?
>
> When working locally (via minishift), on some of our projects the `git
> clone` step of the build takes quite a while, especially over slow
> links. This is compounded by the fact that we're using build chaining,
> a "builder" image and a "runtime" Image, for which the Dockerfiles
> live in the repo, and thus the repo gets cloned twice.
>
> Thus it would be beneficial if there were some way to reduce the
> amount of network traffic between openshift and the git repo.
> If there were some way that openshift would use a persistent volume
> for the repo, and perform a git fetch/pull instead of a full clone,
> then that would work. Alternatively would be utilizing some sort of
> git caching proxy. But not sure what options exist here.
>
> Any suggestions on how to address the issue?
>
> -Patrick
>
>
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.openshift.redhat.com/openshiftmm/listinfo/users

_______________________________________________
users mailing list
[email protected]
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

Reply via email to