Skip to content

Commit

Permalink
Install recent Git version on CentOS 7
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Jan 27, 2022
1 parent 1e9c6e8 commit 6208a41
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions rpm/centos-7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,26 @@ ARG SUITE
ENV DISTRO=${DISTRO}
ENV SUITE=${SUITE}

# Use recent Git version
ARG GIT_VERSION="2.30.0"
RUN yum install -y \
curl-devel \
expat-devel \
gettext-devel \
openssl-devel \
perl-CPAN \
perl-devel \
wget \
zlib-devel \
&& yum --setopt=group_package_types=mandatory,default,optional groupinstall -y "Development Tools" \
&& wget https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz -O git.tar.gz \
&& tar -zxf git.tar.gz \
&& cd git-* \
&& make prefix=/usr/local all \
&& make prefix=/usr/local install \
&& rm -rf /git* \
&& git --version

# In aarch64 (arm64) images, the altarch repo is specified as repository, but
# failing, so replace the URL.
RUN if [ -f /etc/yum.repos.d/CentOS-Sources.repo ]; then sed -i 's/altarch/centos/g' /etc/yum.repos.d/CentOS-Sources.repo; fi
Expand Down

0 comments on commit 6208a41

Please sign in to comment.