Skip to content
Snippets Groups Projects

Fix docker image

Merged Alex Iribarren requested to merge cleanup into master
2 files
+ 8
21
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 5
12
@@ -47,25 +47,20 @@ yum
%end
%post --log=/root/ks-post.log
# randomize root password and lock root account
dd if=/dev/urandom count=50 | md5sum | passwd --stdin root
passwd -l root
# create necessary devices
/sbin/MAKEDEV /dev/console
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-cern
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centostesting
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-kojiv2
# some packages get installed even though we ask for them not to be,
# and they don't have any external dependencies that should make
# anaconda install them
TOREMOVE="kernel kernel-core kernel-modules bind-export-libs dhcp-libs dhcp-client dhcp-common dhcp-libs dracut-network e2fsprogs e2fsprogs-libs iptables-ebtables iptables-libs ethtool file firewalld freetype gettext gettext-libs grub2-tools-minimal grub2-tools-extra grub2-pc grub2-common grub2-pc-modules grub2-tools grubby iproute kexec-tools libcroco libgomp libmnl lzo os-prober python3-decorator python3-slip python3-slip-dbus snappy which linux-firmware"
TOREMOVE="bind-export-libs dhcp-libs dhcp-client dhcp-common dracut-network ethtool file freetype gettext gettext-libs grub2-tools-minimal grub2-tools-extra grub2-common grub2-tools grubby iproute kexec-tools libcroco libgomp libmnl lzo os-prober snappy which"
for remove in $TOREMOVE; do echo -n "removing $remove: "; rpm -e --nodeps $remove; done
LANG="en_US"
echo "%_install_langs $LANG" > /etc/rpm/macros.image-language-conf
rm -rf /etc/firewalld
rm -rf /boot
rm -f /etc/udev/hwdb.bin
@@ -75,8 +70,6 @@ rm -rf /var/lib/dnf/history.*
#delete a few systemd things
rm -rf /etc/machine-id
rm -rf /usr/lib/systemd/system/multi-user.target.wants/getty.target
rm -rf /usr/lib/systemd/system/multi-user.target.wants/systemd-logind.service
# Add tsflags to keep yum from installing docs
Loading