2014-07-29 12:30:03 +00:00
|
|
|
# This is a minimal Fedora install designed to serve as a Docker base image.
|
|
|
|
#
|
|
|
|
# To keep this image minimal it only installs English language. You need to change
|
|
|
|
# yum configuration in order to enable other languages.
|
2015-03-19 21:41:48 +00:00
|
|
|
#
|
|
|
|
### Hacking on this image ###
|
|
|
|
# This kickstart is processed using Anaconda-in-ImageFactory (via Koji typically),
|
|
|
|
# but you can run imagefactory locally too.
|
|
|
|
#
|
|
|
|
# To do so, testing local changes, first you'll need a TDL file. I store one here:
|
|
|
|
# https://git.fedorahosted.org/cgit/fedora-atomic.git/tree/fedora-atomic-rawhide.tdl
|
|
|
|
#
|
|
|
|
# Then, once you have imagefactory and imagefactory-plugins installed, run:
|
|
|
|
#
|
|
|
|
# imagefactory --debug target_image --template /path/to/fedora-atomic-rawhide.tdl --parameter offline_icicle true --file-parameter install_script $(pwd)/fedora-docker-base.ks docker
|
|
|
|
#
|
2014-07-29 12:30:03 +00:00
|
|
|
|
2014-09-03 17:20:26 +00:00
|
|
|
cmdline
|
2015-05-15 21:35:52 +00:00
|
|
|
bootloader --disabled
|
2015-01-28 08:38:40 +00:00
|
|
|
timezone --isUtc --nontp Etc/UTC
|
2014-12-16 21:26:01 +00:00
|
|
|
rootpw --lock --iscrypted locked
|
|
|
|
user --name=none
|
2014-07-29 12:30:03 +00:00
|
|
|
|
|
|
|
keyboard us
|
|
|
|
zerombr
|
|
|
|
clearpart --all
|
2014-07-30 07:23:41 +00:00
|
|
|
part / --size 3000 --fstype ext4
|
2014-08-20 15:46:56 +00:00
|
|
|
network --bootproto=dhcp --device=link --activate --onboot=on
|
2014-07-29 12:30:03 +00:00
|
|
|
reboot
|
|
|
|
|
|
|
|
%packages --excludedocs --instLangs=en --nocore
|
|
|
|
bash
|
2015-03-13 18:36:10 +00:00
|
|
|
fedora-release
|
2015-01-12 11:42:18 +00:00
|
|
|
rootfiles
|
2014-07-29 12:30:03 +00:00
|
|
|
vim-minimal
|
2015-03-07 17:12:24 +00:00
|
|
|
dnf
|
2015-03-25 19:33:35 +00:00
|
|
|
dnf-yum # https://fedorahosted.org/fesco/ticket/1312#comment:29
|
2014-09-10 18:03:29 +00:00
|
|
|
#fakesystemd #TODO: waiting for review https://bugzilla.redhat.com/show_bug.cgi?id=1118740
|
2014-07-29 12:30:03 +00:00
|
|
|
-kernel
|
|
|
|
|
|
|
|
|
|
|
|
%end
|
|
|
|
|
|
|
|
%post --log=/tmp/anaconda-post.log
|
|
|
|
# Set the language rpm nodocs transaction flag persistently in the
|
|
|
|
# image yum.conf and rpm macros
|
|
|
|
|
2014-12-16 21:26:01 +00:00
|
|
|
# remove the user anaconda forces us to make
|
|
|
|
userdel -r none
|
|
|
|
|
2014-07-29 12:30:03 +00:00
|
|
|
LANG="en_US"
|
|
|
|
echo "%_install_lang $LANG" > /etc/rpm/macros.image-language-conf
|
|
|
|
|
2015-09-01 20:55:14 +00:00
|
|
|
# Carry these configs for both dnf and yum for users who are calling
|
|
|
|
# yum-deprecated directly. This will keep the experience between both
|
|
|
|
# consistent
|
2014-07-29 12:30:03 +00:00
|
|
|
awk '(NF==0&&!done){print "override_install_langs='$LANG'\ntsflags=nodocs";done=1}{print}' \
|
|
|
|
< /etc/yum.conf > /etc/yum.conf.new
|
|
|
|
mv /etc/yum.conf.new /etc/yum.conf
|
|
|
|
|
2015-09-01 20:55:14 +00:00
|
|
|
awk '(NF==0&&!done){print "override_install_langs='$LANG'\ntsflags=nodocs";done=1}{print}' \
|
|
|
|
< /etc/dnf/dnf.conf > /etc/dnf/dnf.conf.new
|
|
|
|
mv /etc/dnf/dnf.conf.new /etc/dnf/dnf.conf
|
|
|
|
|
2014-07-29 12:30:03 +00:00
|
|
|
echo "Import RPM GPG key"
|
|
|
|
releasever=$(rpm -q --qf '%{version}\n' fedora-release)
|
|
|
|
basearch=$(uname -i)
|
|
|
|
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
|
|
|
|
|
|
|
|
rm -f /usr/lib/locale/locale-archive
|
2015-01-12 11:42:18 +00:00
|
|
|
|
|
|
|
#Setup locale properly
|
|
|
|
localedef -v -c -i en_US -f UTF-8 en_US.UTF-8
|
|
|
|
|
2014-07-29 12:30:03 +00:00
|
|
|
rm -rf /var/cache/yum/*
|
|
|
|
rm -f /tmp/ks-script*
|
|
|
|
|
2015-01-21 09:17:49 +00:00
|
|
|
#Make it easier for systemd to run in Docker container
|
|
|
|
cp /usr/lib/systemd/system/dbus.service /etc/systemd/system/
|
|
|
|
sed -i 's/OOMScoreAdjust=-900//' /etc/systemd/system/dbus.service
|
|
|
|
|
|
|
|
#Mask mount units and getty service so that we don't get login prompt
|
|
|
|
systemctl mask systemd-remount-fs.service dev-hugepages.mount sys-fs-fuse-connections.mount systemd-logind.service getty.target console-getty.service
|
|
|
|
|
2015-02-06 12:43:59 +00:00
|
|
|
rm -f /etc/machine-id
|
2015-01-21 09:17:49 +00:00
|
|
|
|
2014-07-29 12:30:03 +00:00
|
|
|
%end
|