Skip to content

Commit 8a4c061

Browse files
authored
Merge pull request #274 from tomerd/centos7/git2
update git installation on centos 7 to git 2.x
2 parents 0823b75 + c7f4a1b commit 8a4c061

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

nightly-main/centos/7/Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@ FROM centos:7
22
LABEL maintainer="Swift Infrastructure <[email protected]>"
33
LABEL description="Docker Container for the Swift programming language"
44

5+
# centos 7 ships with git 1.x which is too old for the toolchain usage, using RH software collections to install git 2.x
6+
RUN yum install -y centos-release-scl-rh
7+
58
RUN yum install shadow-utils.x86_64 -y \
69
binutils \
710
gcc \
8-
git \
11+
rh-git227-git \
912
glibc-static \
1013
libbsd-devel \
1114
libcurl-devel \
@@ -20,6 +23,9 @@ RUN yum install shadow-utils.x86_64 -y \
2023
sqlite \
2124
zlib-devel
2225

26+
# centos 7 ships with git 1.x which is too old for the toolchain usage
27+
RUN ln -s /opt/rh/rh-git227/root/bin/git /usr/bin/git
28+
2329
RUN sed -i -e 's/\*__block/\*__libc_block/g' /usr/include/unistd.h
2430

2531
# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little

0 commit comments

Comments
 (0)