Browse code

reuse the febootstrap-minimize from rinse Docker-DCO-1.1-Signed-off-by: Sam Bailey <sam@thatsamguy.com> (github: thatsamguy)

Sam Bailey authored on 2014/06/03 19:41:32
Showing 2 changed files
... ...
@@ -13,7 +13,7 @@ shift
13 13
 	#  docs
14 14
 	rm -rf usr/share/{man,doc,info,gnome/help}
15 15
 	#  cracklib
16
-	#rm -rf usr/share/cracklib
16
+	rm -rf usr/share/cracklib
17 17
 	#  i18n
18 18
 	rm -rf usr/share/i18n
19 19
 	#  yum cache
... ...
@@ -53,25 +53,7 @@ fi
53 53
 		--root "$rootfsDir"
54 54
 )
55 55
 
56
-(
57
-	# Clean cruft to reduce image size - stolen and modifed from .febootstrap-minimize
58
-	set -x
59
-	cd "$rootfsDir"
60
-	#  locales
61
-	rm -rf usr/{{lib,share}/locale,{lib,lib64}/gconv,bin/localedef,sbin/build-locale-archive}
62
-	#  docs
63
-	rm -rf usr/share/{man,doc,info,gnome/help}
64
-	#  cracklib
65
-	rm -rf usr/share/cracklib
66
-	#  i18n
67
-	rm -rf usr/share/i18n
68
-	#  sln
69
-	rm -rf sbin/sln
70
-	#  ldconfig
71
-	#rm -rf sbin/ldconfig
72
-	rm -rf etc/ld.so.cache var/cache/ldconfig
73
-	mkdir -p --mode=0755 var/cache/ldconfig
74
-)
56
+"$(dirname "$BASH_SOURCE")/.febootstrap-minimize" "$rootfsDir"
75 57
 
76 58
 if [ -d "$rootfsDir/etc/sysconfig" ]; then
77 59
 	# allow networking init scripts inside the container to work without extra steps