diff options
author | James E. Blair <jeblair@redhat.com> | 2020-12-11 09:15:45 -0800 |
---|---|---|
committer | James E. Blair <jeblair@redhat.com> | 2020-12-11 09:23:46 -0800 |
commit | f3e8c809dc8439e555ee162c411b039d85c6b5bf (patch) | |
tree | 040e623d9d6a52da73b98181e0b1ddf82f7ac175 /Dockerfile | |
parent | c911e26fa6058df7810c1cdbe8ca4ce400dcdaae (diff) | |
download | zuul-f3e8c809dc8439e555ee162c411b039d85c6b5bf.tar.gz |
Enable git protocol v2 in container images
Git versions between 2.18 and 2.26 have version 2 protocol support
but it's not enabled by default. Starting in 2.26, it is the
default. V2 is more efficient at negotiating refs and can reduce
the time spent updating a repo by 50% on large repos.
This adds a setting to the container images to specify that v2
should be used. The images are currently built with git 2.20, which
is in the range where this is needed.
Change-Id: Ifc471c5fde49c65137bc34e49734b3ac3d33e3e1
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile index 670922214..f46c09c44 100644 --- a/Dockerfile +++ b/Dockerfile @@ -55,6 +55,11 @@ RUN /output/install-from-bindep zuul_base \ && rm -rf /output RUN useradd -u 10001 -m -d /var/lib/zuul -c "Zuul Daemon" zuul +# This enables git protocol v2 which is more efficient at negotiating +# refs. This can be removed after the images are built with git 2.26 +# where it becomes the default. +RUN git config --system protocol.version 2 + VOLUME /var/lib/zuul CMD ["/usr/local/bin/zuul"] |