#!/usr/bin/env bash # # Create a base CentOS Docker image. # # This script is useful on systems with yum installed (e.g., building # a CentOS image on CentOS). See contrib/mkimage-rinse.sh for a way # to build CentOS images on other systems. yum_config=$1 target=$2 set -ex package_to_install="@base @core @debugging @directory-client @guest-agents @hardware-monitoring @network-file-system-client @performance @remote-system-management grub2 kernel kernel-devel epel-release ansible yum-utils ipmitool docker-ce docker-ce-cli containerd.io" setopt="group_package_types=mandatory,default,optional" yum -c "$yum_config" --installroot="$target" -y --setopt=$setopt install $package_to_install cat > "$target"/etc/sysconfig/network < input/centos-7-chroot.tar.bz2 #rm -rf "$target"