#119 Clean up fedora docker kickstart file
Merged 7 years ago by ausil. Opened 7 years ago by dustymabe.
dustymabe/fedora-kickstarts dusty-docker-fixups  into  master

file modified
+1 -1
@@ -24,7 +24,7 @@ 

  #   imagefactory --debug base_image --file-parameter install_script ${tempfile} fedora-atomic-rawhide.tdl

  #

  

- cmdline

+ text # don't use cmdline -- https://github.com/rhinstaller/anaconda/issues/931

  lang en_US.UTF-8

  keyboard us

  timezone --utc Etc/UTC

file modified
+12 -17
@@ -15,11 +15,10 @@ 

  #   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

  #

  

- cmdline

+ text # don't use cmdline -- https://github.com/rhinstaller/anaconda/issues/931

  bootloader --disabled

  timezone --isUtc --nontp Etc/UTC

  rootpw --lock --iscrypted locked

- user --name=none

  

  keyboard us

  zerombr
@@ -43,37 +42,33 @@ 

  

  %end

  

- %post --log=/tmp/anaconda-post.log

- 

- set -e

- 

- # Set the language rpm nodocs transaction flag persistently in the

- # image yum.conf and rpm macros

- 

- # remove the user anaconda forces us to make

- userdel -r none

+ %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)

  basearch=$(uname -i)

  rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch

  

  echo "# fstab intentionally empty for containers" > /etc/fstab

- rm -f /usr/lib/locale/locale-archive

- 

- #Setup locale properly

- localedef -v -c -i en_US -f UTF-8 en_US.UTF-8

  

- rm -rf /var/cache/yum/*

- rm -f /tmp/ks-script*

+ # remove some extraneous files

+ rm -rf /var/cache/dnf/*

+ rm -rf /tmp/*

  

  #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

  

+ # https://bugzilla.redhat.com/show_bug.cgi?id=1343138

  # Fix /run/lock breakage since it's not tmpfs in docker

+ # This unmounts /run (tmpfs) and then recreates the files

+ # in the /run directory on the root filesystem of the container

  umount /run

  systemd-tmpfiles --create --boot

  

Removed some things. Fixed some things. Added comments. See commit messages for explanations.

Also moved cloud base file to use text vs cmdline.

Pull-Request has been merged by ausil

7 years ago