2019-01-03 14:52:05 +00:00
|
|
|
# This is the common bits between Fedora Container base image.
|
2017-03-23 17:40:57 +00:00
|
|
|
#
|
|
|
|
# To keep this image minimal it only installs English language. You need to change
|
|
|
|
# dnf configuration in order to enable other languages.
|
|
|
|
#
|
|
|
|
# ## 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:
|
2017-07-07 19:58:34 +00:00
|
|
|
# https://pagure.io/fedora-atomic/raw/master/f/fedora-atomic-rawhide.tdl
|
2017-03-23 17:40:57 +00:00
|
|
|
#
|
|
|
|
# Then, once you have imagefactory and imagefactory-plugins installed, run:
|
|
|
|
#
|
2019-01-03 14:52:05 +00:00
|
|
|
# ksflatten -c fedora-container-base[-minimal].ks -o fedora-container-base-test.ks
|
|
|
|
# imagefactory --debug target_image --template /path/to/fedora-atomic-rawhide.tdl --parameter offline_icicle true --file-parameter install_script $(pwd)/fedora-container-base-test.ks docker
|
2017-03-23 17:40:57 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
text # don't use cmdline -- https://github.com/rhinstaller/anaconda/issues/931
|
|
|
|
bootloader --disabled
|
2021-04-01 08:44:37 +00:00
|
|
|
timezone --isUtc Etc/UTC
|
|
|
|
timesource --ntp-disable
|
2017-03-23 17:40:57 +00:00
|
|
|
rootpw --lock --iscrypted locked
|
|
|
|
keyboard us
|
|
|
|
network --bootproto=dhcp --device=link --activate --onboot=on
|
|
|
|
reboot
|
|
|
|
|
2017-05-19 17:00:30 +00:00
|
|
|
# boot partitions are irrelevant as the final docker image is a tarball
|
2017-03-23 17:40:57 +00:00
|
|
|
zerombr
|
|
|
|
clearpart --all
|
2017-05-15 16:30:43 +00:00
|
|
|
autopart --noboot --nohome --noswap --nolvm
|
2017-03-23 17:40:57 +00:00
|
|
|
|
2019-07-22 16:56:49 +00:00
|
|
|
%packages --excludedocs --instLangs=en --nocore --excludeWeakdeps
|
2019-01-03 08:55:53 +00:00
|
|
|
fedora-release-container
|
2017-03-23 17:40:57 +00:00
|
|
|
bash
|
2018-11-02 18:33:19 +00:00
|
|
|
coreutils
|
2018-01-23 04:21:40 +00:00
|
|
|
glibc-minimal-langpack
|
2023-10-24 11:33:29 +00:00
|
|
|
tzdata
|
2018-01-23 04:21:40 +00:00
|
|
|
rpm
|
2022-01-05 11:53:38 +00:00
|
|
|
util-linux-core
|
2017-03-23 17:40:57 +00:00
|
|
|
-kernel
|
2017-03-24 18:19:28 +00:00
|
|
|
-dosfstools
|
|
|
|
-e2fsprogs
|
|
|
|
-fuse-libs
|
|
|
|
-gnupg2-smime
|
|
|
|
-libss # used by e2fsprogs
|
|
|
|
-pinentry
|
|
|
|
-shared-mime-info
|
|
|
|
-trousers
|
|
|
|
-xkeyboard-config
|
2018-10-28 18:20:54 +00:00
|
|
|
-grubby
|
2021-04-01 18:02:02 +00:00
|
|
|
-langpacks-en_GB
|
2021-04-20 13:58:43 +00:00
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1951111
|
2021-05-03 08:25:55 +00:00
|
|
|
-util-linux
|
2021-04-20 13:58:43 +00:00
|
|
|
-sssd-client
|
2017-03-23 17:40:57 +00:00
|
|
|
|
|
|
|
%end
|
|
|
|
|
|
|
|
%post --erroronfail --log=/root/anaconda-post.log
|
|
|
|
set -eux
|
|
|
|
|
|
|
|
# Set install langs macro so that new rpms that get installed will
|
|
|
|
# only install langs that we limit it to.
|
|
|
|
LANG="en_US"
|
|
|
|
echo "%_install_langs $LANG" > /etc/rpm/macros.image-language-conf
|
|
|
|
|
2019-07-11 06:55:38 +00:00
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1727489
|
|
|
|
echo 'LANG="C.UTF-8"' > /etc/locale.conf
|
|
|
|
|
2017-03-23 17:40:57 +00:00
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1400682
|
|
|
|
echo "Import RPM GPG key"
|
2022-01-19 20:07:46 +00:00
|
|
|
releasever=$(rpm --eval '%{?fedora}')
|
|
|
|
|
|
|
|
# When building ELN containers, we don't have the %{fedora} macro
|
|
|
|
if [ -z $releasever ]; then
|
|
|
|
releasever=eln
|
|
|
|
fi
|
|
|
|
|
2017-03-23 17:40:57 +00:00
|
|
|
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-primary
|
|
|
|
|
|
|
|
echo "# fstab intentionally empty for containers" > /etc/fstab
|
|
|
|
|
|
|
|
# Remove machine-id on pre generated images
|
|
|
|
rm -f /etc/machine-id
|
|
|
|
touch /etc/machine-id
|
|
|
|
|
2022-07-20 06:39:03 +00:00
|
|
|
echo "# resolv placeholder" > /etc/resolv.conf
|
|
|
|
chmod 644 /etc/resolv.conf
|
2017-03-23 17:40:57 +00:00
|
|
|
%end
|