Fix dev image uid and build off rhel7

This commit is contained in:
Robert Parker
2018-08-23 10:16:14 +01:00
parent 64f5ce3624
commit e03ceff7c9
5 changed files with 19 additions and 21 deletions

View File

@@ -28,7 +28,7 @@ set -e
# Use a "scratch" container, so the resulting image has minimal files
# Resulting image won't have yum, for example
readonly ctr_mq=$(buildah from scratch)
readonly ctr_mq=$(buildah from rhel7)
readonly mnt_mq=$(buildah mount $ctr_mq)
readonly archive=downloads/$1
readonly packages=$2
@@ -36,18 +36,12 @@ readonly tag=$3
readonly version=$4
readonly mqdev=$5
# Initialize yum for use with the scratch container
rpm --root $mnt_mq --initdb
yumdownloader --destdir=/tmp redhat-release-server
rpm --root $mnt_mq -ihv /tmp/redhat-release-server*.rpm || true
###############################################################################
# Install MQ server
###############################################################################
# Install the packages required by MQ
yum install -y --installroot=${mnt_mq} --setopt install_weak_deps=false --setopt=tsflags=nodocs --setopt=override_install_langs=en_US.utf8 \
buildah run $ctr_mq -- yum install -y --setopt install_weak_deps=false --setopt=tsflags=nodocs --setopt=override_install_langs=en_US.utf8 \
bash \
bc \
coreutils \
@@ -63,7 +57,7 @@ yum install -y --installroot=${mnt_mq} --setopt install_weak_deps=false --setopt
util-linux
# Clean up cached files
yum clean all --installroot=${mnt_mq}
buildah run $ctr_mq -- yum clean all
rm -rf ${mnt_mq}/var/cache/yum/*
# Install MQ server packages into the MQ builder image
@@ -110,3 +104,5 @@ buildah config \
$ctr_mq
buildah unmount $ctr_mq
buildah commit $ctr_mq $tag
buildah rm $ctr_mq