Skip to content
Snippets Groups Projects

feat: strip /opt/software, not /usr/local; build_type Release

Merged Wouter Deconinck requested to merge build_type-release into master
2 files
+ 9
3
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -179,11 +179,14 @@ WORKDIR /
@@ -179,11 +179,14 @@ WORKDIR /
## ========================================================================================
## ========================================================================================
FROM builder as staging
FROM builder as staging
 
# Garbage collect in environment
RUN cd /opt/spack-environment && spack env activate . && spack gc -y
RUN cd /opt/spack-environment && spack env activate . && spack gc -y
 
# Strip all the binaries
# Strip all the binaries
# This reduces the image by factor of x2, so worth the effort
# This reduces the image by factor of x2, so worth the effort
# note that we do not strip python libraries as it can cause issues in some cases
# note that we do not strip python libraries as it can cause issues in some cases
RUN find -L /usr/local/* \
RUN du -sh /opt/software/linux-*/gcc-*/* | sort -h \
 
&& find -L /opt/software/* \
-type d -name site-packages -prune -false \
-type d -name site-packages -prune -false \
-o \
-o \
-type d -name lib-dynload -prune -false \
-type d -name lib-dynload -prune -false \
@@ -193,7 +196,8 @@ RUN find -L /usr/local/* \
@@ -193,7 +196,8 @@ RUN find -L /usr/local/* \
| xargs file -i \
| xargs file -i \
| grep 'charset=binary' \
| grep 'charset=binary' \
| grep 'x-executable\|x-sharedlib' \
| grep 'x-executable\|x-sharedlib' \
| awk -F: '{print $1}' | xargs strip -s
| awk -F: '{print $1}' | xargs strip -s \
 
&& du -sh /opt/software/linux-*/gcc-*/* | sort -h
## Bugfix to address issues loading the Qt5 libraries on Linux kernels prior to 3.15
## Bugfix to address issues loading the Qt5 libraries on Linux kernels prior to 3.15
## See
## See
Loading