Skip to content

Commit d92da2e

Browse files
committed
[manylinux2010] Reduce glibc rebuild cache size
2.5GB -> 1GB, should save resources on both local builds and travis-ci builds
1 parent 4c184be commit d92da2e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

docker/glibc/Dockerfile-i686

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ RUN sed -i 's/enabled=1/enabled=0/g' /etc/yum/pluginconf.d/fastestmirror.conf &&
88
sed -i 's;^#baseurl=http://mirror;baseurl=https://vault;g' /etc/yum.repos.d/*.repo
99

1010
RUN echo "i386" > /etc/yum/vars/basearch
11-
RUN yum -y update && \
12-
yum install -y util-linux-ng
11+
RUN yum install -y util-linux-ng && \
12+
yum -y clean all && \
13+
rm -rf /var/cache/yum/*
1314
COPY ./build_scripts /build_scripts
1415
RUN linux32 bash /build_scripts/rebuild-glibc-without-vsyscall.sh

docker/glibc/build_scripts/rebuild-glibc-without-vsyscall.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,7 @@ mv $SRPM_TOPDIR/RPMS/* /rpms/
5252
# Show us what happened last before cleaning up the log
5353
echo ~~~~~~~~~~~~~~~~~~~~~ final lines of the build log ~~~~~~~~~~~~~~~~~~~~~ >/dev/null
5454
tail -n30 /var/log/build.log
55-
rm /var/log/build.log
55+
56+
# We don't need to keep anything execept /rpms/*
57+
rm -rf /root /tmp /var /sbin
58+
rm -rf /usr /lib*

0 commit comments

Comments
 (0)