# This is a minimal kickstart designed for docker. # It will not produce a bootable system # To use this kickstart, run the following command # livemedia-creator --make-tar \ # --iso=/path/to/boot.iso \ # --ks=centos-8.ks \ # --image-name=centos-root.tar.xz # # Basic setup information text keyboard us rootpw --lock --iscrypted locked timezone --isUtc --nontp UTC selinux --enforcing firewall --disabled network --bootproto=dhcp --device=link --activate --onboot=on shutdown bootloader --disable lang en_US.UTF-8 # Disk setup zerombr clearpart --all --initlabel autopart --noboot --nohome --noswap --nolvm --fstype=ext4 # Package setup # yum remove -y --skip-broken libgomp which diffutils libmaxminddb libibverbs memstrack kbd-legacy xkeyboard-config platform-python-pip crypto-policies-scripts kpartx elfutils-debuginfod-client kbd trousers-lib libcroco os-prober gettext trousers libevent unbound-libs libsecret libmodulemd1 glibc-langpack-en glibc-gconv-extra grub2-common pigz hardlink libnl3 libpcap kbd-misc libxkbcommon grub2-tools-minimal grubby openssl-pkcs11 gettext-libs grub2-tools shared-mime-info python3-unbound pinentry rpm-plugin-systemd-inhibit gnupg2-smime iptables-libs libmetalink %packages --excludedocs --instLangs=en --nocore --excludeWeakdeps --ignoremissing anolis-release binutils -brotli bash hostname rootfiles coreutils-single glibc-minimal-langpack vim-minimal less -gettext* -firewalld -os-prober* tar -iptables iputils -dosfstools -e2fsprogs -fuse-libs -gnupg2-smime -libss -pinentry -shared-mime-info -trousers -xkeyboard-config -xfsprogs -qemu-guest-agent yum -grub\* -kernel -libgomp -which -diffutils -libmaxminddb -libibverbs -memstrack -kbd-legacy -xkeyboard-config -platform-python-pip -crypto-policies-scripts -kpartx -elfutils-debuginfod-client -kbd -trousers-lib -libcroco -os-prober -gettext -trousers -libevent -unbound-libs -libsecret -libmodulemd1 -glibc-langpack-en -glibc-gconv-extra -grub2-common -pigz -hardlink -libnl3 -libpcap -kbd-misc -libxkbcommon -grub2-tools-minimal -grubby -openssl-pkcs11 -gettext-libs -grub2-tools -shared-mime-info -python3-unbound -pinentry -rpm-plugin-systemd-inhibit -gnupg2-smime -iptables-libs -libmetalink %end %post --erroronfail --log=/root/anaconda-post.log # container customizations inside the chroot echo 'container' > /etc/dnf/vars/infra #Generate installtime file record /bin/date +%Y%m%d_%H%M > /etc/BUILDTIME # Limit languages to help reduce size. LANG="en_US" echo "%_install_langs $LANG" > /etc/rpm/macros.image-language-conf # systemd fixes :> /etc/machine-id umount /run systemd-tmpfiles --create --boot # mask mounts and login bits systemctl mask systemd-logind.service getty.target console-getty.service sys-fs-fuse-connections.mount systemd-remount-fs.service dev-hugepages.mount # Remove things we don't need rm -f /etc/udev/hwdb.bin rm -rf /usr/lib/udev/hwdb.d/ rm -rf /boot rm -rf /var/lib/dnf/history.* %end