Skip to content

Commit fbb3216

Browse files
committed
adding a wip centos8 container kickstart
1 parent 7135fb2 commit fbb3216

File tree

1 file changed

+90
-0
lines changed

1 file changed

+90
-0
lines changed

docker/centos-8.ks

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# This is a minimal CentOS kickstart designed for docker.
2+
# It will not produce a bootable system
3+
# To use this kickstart, run the following command
4+
# livemedia-creator --make-tar \
5+
# --iso=/path/to/boot.iso \
6+
# --ks=centos-7.ks \
7+
# --image-name=centos-root.tar.xz
8+
#
9+
10+
# Basic setup information
11+
install
12+
keyboard us
13+
rootpw --lock --iscrypted locked
14+
timezone --isUtc --nontp UTC
15+
selinux --enforcing
16+
firewall --disabled
17+
network --bootproto=dhcp --device=link --activate --onboot=on
18+
shutdown
19+
bootloader --disable
20+
lang en_US
21+
22+
23+
# Disk setup
24+
zerombr
25+
clearpart --all --initlabel
26+
autopart --noboot --nohome --noswap --nolvm --fstype=ext4
27+
28+
# Package setup
29+
%packages --excludedocs --instLangs=en --nocore
30+
centos-release
31+
binutils
32+
-brotli
33+
bash
34+
coreutils-single
35+
glibc-minimal-langpack
36+
vim-minimal
37+
less
38+
-gettext*
39+
-firewalld
40+
-os-prober*
41+
tar
42+
-iptables
43+
iputils
44+
-kernel
45+
-dosfstools
46+
-e2fsprogs
47+
-fuse-libs
48+
-gnupg2-smime
49+
-libss
50+
-pinentry
51+
-shared-mime-info
52+
-trousers
53+
-xkeyboard-config
54+
-xfsprogs
55+
-qemu-guest-agent
56+
yum
57+
-grub\*
58+
59+
%end
60+
61+
%post --erroronfail --log=/root/anaconda-post.log
62+
# container customizations inside the chroot
63+
64+
echo 'container' > /etc/dnf/vars/infra
65+
66+
#Generate installtime file record
67+
/bin/date +%Y%m%d_%H%M > /etc/BUILDTIME
68+
69+
# Limit languages to help reduce size.
70+
LANG="en_US"
71+
echo "%_install_langs $LANG" > /etc/rpm/macros.image-language-conf
72+
73+
74+
# systemd fixes
75+
:> /etc/machine-id
76+
umount /run
77+
systemd-tmpfiles --create --bot
78+
# mask mounts and login bits
79+
systemctl mask systemd-logind.service getty.target console-getty.service sys-fs-fuse-connections.mount systemd-remount-fs.service dev-hugepages.mount
80+
81+
# Remove things we don't need
82+
rm -f /etc/udev/hwdb.bin
83+
rm -rf /usr/lib/udev/hwdb.d/
84+
rm -rf /boot
85+
rm -rf /var/lib/dnf/history.*
86+
87+
88+
%end
89+
90+

0 commit comments

Comments
 (0)