Skip to content

Commit 1761148

Browse files
authored
fix: use symlinks & strip git while installing (#1864)
For some reason, the size of the images increased a lot around the time we moved to building git with clang but, local tests show that it does not seem related. Rework git build configuration to reduce image size.
1 parent 851d583 commit 1761148

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

docker/build_scripts/build-git.sh

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,21 @@ fetch_source "${GIT_ROOT}.tar.gz" "${GIT_DOWNLOAD_URL}"
4444
check_sha256sum "${GIT_ROOT}.tar.gz" "${GIT_HASH}"
4545
tar -xzf "${GIT_ROOT}.tar.gz"
4646
pushd "${GIT_ROOT}"
47-
make install prefix=/usr/local NO_GETTEXT=1 NO_TCLTK=1 DESTDIR=/manylinux-rootfs CSPRNG_METHOD=${CSPRNG_METHOD} CPPFLAGS="${MANYLINUX_CPPFLAGS}" CFLAGS="${MANYLINUX_CFLAGS}" CXXFLAGS="${MANYLINUX_CXXFLAGS}" LDFLAGS="${MANYLINUX_LDFLAGS}"
47+
make install \
48+
prefix=/usr/local \
49+
NO_GETTEXT=1 \
50+
NO_TCLTK=1 \
51+
INSTALL_SYMLINKS=1 \
52+
INSTALL_STRIP=-s \
53+
DESTDIR=/manylinux-rootfs \
54+
CSPRNG_METHOD=${CSPRNG_METHOD} \
55+
CPPFLAGS="${MANYLINUX_CPPFLAGS}" \
56+
CFLAGS="${MANYLINUX_CFLAGS}" \
57+
CXXFLAGS="${MANYLINUX_CXXFLAGS}" \
58+
LDFLAGS="${MANYLINUX_LDFLAGS}"
4859
popd
4960
rm -rf "${GIT_ROOT}" "${GIT_ROOT}.tar.gz"
5061

51-
52-
# Strip what we can
53-
strip_ /manylinux-rootfs
54-
5562
# Install
5663
cp -rlf /manylinux-rootfs/* /
5764

0 commit comments

Comments
 (0)