mirror of
https://pagure.io/fedora-kickstarts.git
synced 2025-12-06 11:39:40 +08:00
Add a docker common kickstart as a central bit for shared config.
There's a lot of similarities between base and base-minimal so introduce a docker-common.ks to ensure as much as possible is shared between the two ensure as much shared as possible. Signed-off-by: Peter Robinson <pbrobinson@fedoraproject.org>
This commit is contained in:
60
fedora-docker-common.ks
Normal file
60
fedora-docker-common.ks
Normal file
@@ -0,0 +1,60 @@
|
||||
# This is the common bits between Fedora Docker base image.
|
||||
#
|
||||
# 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:
|
||||
# https://git.fedorahosted.org/cgit/fedora-atomic.git/tree/fedora-atomic-rawhide.tdl
|
||||
#
|
||||
# Then, once you have imagefactory and imagefactory-plugins installed, run:
|
||||
#
|
||||
# ksflatten -c fedora-docker-base[-minimal].ks -o fedora-docker-base-test.ks
|
||||
# imagefactory --debug target_image --template /path/to/fedora-atomic-rawhide.tdl --parameter offline_icicle true --file-parameter install_script $(pwd)/fedora-docker-base-test.ks docker
|
||||
#
|
||||
|
||||
text # don't use cmdline -- https://github.com/rhinstaller/anaconda/issues/931
|
||||
bootloader --disabled
|
||||
timezone --isUtc --nontp Etc/UTC
|
||||
rootpw --lock --iscrypted locked
|
||||
keyboard us
|
||||
network --bootproto=dhcp --device=link --activate --onboot=on
|
||||
reboot
|
||||
|
||||
# boot partitions are irrelevant as none of that content is taken into the final docker image
|
||||
# We will be able to move to autopart when new pykickstart lands which adds option for noswap/noboot (fixed upstream)
|
||||
zerombr
|
||||
clearpart --all
|
||||
part /boot/efi --fstype="vfat" --size=100
|
||||
part / --fstype ext4 --grow
|
||||
|
||||
%packages --excludedocs --instLangs=en --nocore
|
||||
fedora-release
|
||||
bash
|
||||
-kernel
|
||||
|
||||
%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
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1400682
|
||||
echo "Import RPM GPG key"
|
||||
releasever=$(rpm -q --qf '%{version}\n' fedora-release)
|
||||
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
|
||||
|
||||
%end
|
||||
Reference in New Issue
Block a user