ladar / centos / kickstarts

Forked from centos/kickstarts 5 years ago
Clone

Blame CentOS-8-Docker.ks

Brian Stinson fc821a
# This is a minimal CentOS kickstart designed for docker.
Brian Stinson fc821a
# It will not produce a bootable system
Brian Stinson fc821a
# To use this kickstart, run the following command
Brian Stinson fc821a
# livemedia-creator --make-tar \
Brian Stinson fc821a
#   --iso=/path/to/boot.iso  \
Brian Stinson fc821a
#   --ks=centos-8.ks \
Brian Stinson fc821a
#   --image-name=centos-root.tar.xz
Brian Stinson fc821a
#
Brian Stinson fc821a
Brian Stinson fc821a
# Basic setup information
Brian Stinson fc821a
install
Brian Stinson fc821a
keyboard us
Brian Stinson fc821a
rootpw --lock --iscrypted locked
Brian Stinson fc821a
timezone --isUtc --nontp UTC
Brian Stinson fc821a
selinux --enforcing
Brian Stinson fc821a
firewall --disabled
Brian Stinson fc821a
network --bootproto=dhcp --device=link --activate --onboot=on
Brian Stinson fc821a
shutdown
Brian Stinson fc821a
bootloader --disable
Brian Stinson fc821a
lang en_US
Brian Stinson fc821a
Brian Stinson fc821a
Brian Stinson fc821a
# Disk setup
Brian Stinson fc821a
zerombr
Brian Stinson fc821a
clearpart --all --initlabel
Brian Stinson 9ad040
#autopart --noboot --nohome --noswap --nolvm --fstype=ext4
Brian Stinson 9ad040
part / --size 3000 --fstype=ext4
Brian Stinson fc821a
Brian Stinson fc821a
# Package setup
Brian Stinson fc821a
%packages --excludedocs --instLangs=en --nocore
Brian Stinson fc821a
centos-release
Brian Stinson fc821a
binutils
Brian Stinson fc821a
-brotli
Brian Stinson fc821a
bash
Brian Stinson fc821a
hostname
Brian Stinson fc821a
rootfiles
Brian Stinson fc821a
coreutils-single
Brian Stinson fc821a
glibc-minimal-langpack
Brian Stinson fc821a
vim-minimal
Brian Stinson fc821a
less
Brian Stinson fc821a
-gettext*
Brian Stinson fc821a
-firewalld
Brian Stinson fc821a
-os-prober*
Brian Stinson fc821a
tar
Brian Stinson fc821a
-iptables
Brian Stinson fc821a
iputils
Brian Stinson fc821a
-kernel
Brian Stinson fc821a
-dosfstools
Brian Stinson fc821a
-e2fsprogs
Brian Stinson fc821a
-fuse-libs
Brian Stinson fc821a
-gnupg2-smime
Brian Stinson fc821a
-libss
Brian Stinson fc821a
-pinentry
Brian Stinson fc821a
-shared-mime-info
Brian Stinson fc821a
-trousers
Brian Stinson fc821a
-xkeyboard-config
Brian Stinson fc821a
-xfsprogs
Brian Stinson fc821a
-qemu-guest-agent
Brian Stinson fc821a
yum
Brian Stinson fc821a
-grub\*
Brian Stinson fc821a
Brian Stinson fc821a
%end
Brian Stinson fc821a
Brian Stinson fc821a
%post --erroronfail --log=/root/anaconda-post.log
Brian Stinson fc821a
# container customizations inside the chroot
Brian Stinson fc821a
Brian Stinson fc821a
echo 'container' > /etc/dnf/vars/infra
Brian Stinson fc821a
Brian Stinson fc821a
#Generate installtime file record
Brian Stinson fc821a
/bin/date +%Y%m%d_%H%M > /etc/BUILDTIME
Brian Stinson fc821a
Brian Stinson fc821a
# Limit languages to help reduce size.
Brian Stinson fc821a
LANG="en_US"
Brian Stinson fc821a
echo "%_install_langs $LANG" > /etc/rpm/macros.image-language-conf
Brian Stinson fc821a
Brian Stinson fc821a
Brian Stinson fc821a
# systemd fixes
Brian Stinson fc821a
:> /etc/machine-id
Brian Stinson fc821a
umount /run
Brian Stinson fc821a
systemd-tmpfiles --create --boot
Brian Stinson fc821a
# mask mounts and login bits
Brian Stinson fc821a
systemctl mask systemd-logind.service getty.target console-getty.service sys-fs-fuse-connections.mount systemd-remount-fs.service dev-hugepages.mount
Brian Stinson fc821a
Brian Stinson fc821a
# Remove things we don't need
Brian Stinson fc821a
rm -f /etc/udev/hwdb.bin
Brian Stinson fc821a
rm -rf /usr/lib/udev/hwdb.d/
Brian Stinson fc821a
rm -rf /boot
Brian Stinson fc821a
rm -rf /var/lib/dnf/history.*
Brian Stinson fc821a
Brian Stinson fc821a
Brian Stinson fc821a
%end
Brian Stinson fc821a
Brian Stinson fc821a