docker-min: add in post processing from walters' scripts
He has done some work on this in the past at [1].
[1] - 3f6c905fef/postprocess.sh
This commit is contained in:
parent
2f3f37ebd6
commit
5cbb3babd0
@ -76,4 +76,38 @@ systemd-tmpfiles --create --boot
|
|||||||
rm -f /etc/machine-id
|
rm -f /etc/machine-id
|
||||||
touch /etc/machine-id
|
touch /etc/machine-id
|
||||||
|
|
||||||
|
# Strip documentation
|
||||||
|
find usr/share/doc/ -type f |
|
||||||
|
(while read line; do
|
||||||
|
bn=$(basename ${line});
|
||||||
|
if echo ${bn} | grep -Eiq '^(COPYING|LICENSE)'; then
|
||||||
|
continue
|
||||||
|
else
|
||||||
|
rm $line
|
||||||
|
fi;
|
||||||
|
done)
|
||||||
|
|
||||||
|
rm usr/share/doc/{info,man} -rf
|
||||||
|
rm usr/share/gnupg/help*.txt -f
|
||||||
|
|
||||||
|
# See: https://bugzilla.redhat.com/show_bug.cgi?id=1051816
|
||||||
|
KEEPLANG=en_US
|
||||||
|
for dir in locale i18n; do
|
||||||
|
find usr/share/${dir} -mindepth 1 -maxdepth 1 -type d -not \( -name "${KEEPLANG}" -o -name POSIX \) -exec rm -rf {} +
|
||||||
|
done
|
||||||
|
|
||||||
|
# Pruning random things
|
||||||
|
rm usr/lib/rpm/rpm.daily # seriously?
|
||||||
|
rm usr/lib64/nss/unsupported-tools/ -rf # unsupported
|
||||||
|
|
||||||
|
# gcc should really split this off
|
||||||
|
rm usr/share/gcc*/python -rf
|
||||||
|
|
||||||
|
# Statically linked crap
|
||||||
|
rm usr/sbin/{glibc_post_upgrade.x86_64,sln}
|
||||||
|
ln usr/bin/ln usr/sbin/sln
|
||||||
|
|
||||||
|
# Final pruning
|
||||||
|
rm -rf etc/machine-id var/cache/* var/log/* run/* tmp/*
|
||||||
|
|
||||||
%end
|
%end
|
||||||
|
Loading…
Reference in New Issue
Block a user