1
1
mirror of https://pagure.io/fedora-kickstarts.git synced 2024-11-12 02:54:22 +00:00

Remove not needed files from the container base image.

This brings some of the fedora-minimal optimization to the fedora
base image. We remove the timezones info, default fonts and some
logs.

Signed-off-by: Clement Verna <cverna@tutanota.com>
This commit is contained in:
Clement Verna 2019-07-25 06:52:29 +00:00
parent 1c39c0adb0
commit e8fd539b8c

View File

@ -15,6 +15,7 @@ sssd-client
sudo
-glibc-langpack-en
-cracklib-dicts
-dejavu-sans-fonts
%end
%post --erroronfail --log=/root/anaconda-post.log
@ -46,6 +47,18 @@ umount /run
systemd-tmpfiles --prefix=/run/ --prefix=/var/run/ --create --boot || true
rm /run/nologin # https://pagure.io/atomic-wg/issue/316
# Remove some dnf info
rm -rfv /var/lib/dnf
# if you want to change the timezone, bind-mount it from the host or reinstall tzdata
# Work around waiting for a tzdata-minimal package see https://bugzilla.redhat.com/show_bug.cgi?id=1733452
rm -fv /etc/localtime
mv /usr/share/zoneinfo/UTC /etc/localtime
rm -rfv /usr/share/zoneinfo
# Final pruning
rm -rfv /var/cache/* /var/log/* /tmp/*
%end
%post --nochroot --erroronfail --log=/mnt/sysimage/root/anaconda-post-nochroot.log