diff --git a/mq-advanced-server-rhel/install-mq-rhel.sh b/mq-advanced-server-rhel/install-mq-rhel.sh index 4bf7472..6cd5967 100755 --- a/mq-advanced-server-rhel/install-mq-rhel.sh +++ b/mq-advanced-server-rhel/install-mq-rhel.sh @@ -59,6 +59,15 @@ buildah run $ctr -- /opt/mqm/bin/setmqinst -p /opt/mqm -i mkdir -p $scratchmnt/run/runmqserver chown 888:888 $scratchmnt/run/runmqserver +# Remove the directory structure under /var/mqm which was created by the installer +rm -rf $scratchmnt/var/mqm + +# Create the mount point for volumes +mkdir -p $scratchmnt/mnt/mqm + +# Create a symlink for /var/mqm -> /mnt/mqm/data +buildah run $ctr -- ln -s /mnt/mqm/data /var/mqm + # Optional: Set these values for the IBM Cloud Vulnerability Report sed -i 's/PASS_MAX_DAYS\t99999/PASS_MAX_DAYS\t90/' $scratchmnt/etc/login.defs sed -i 's/PASS_MIN_DAYS\t0/PASS_MIN_DAYS\t1/' $scratchmnt/etc/login.defs diff --git a/mq-advanced-server-rhel/mq-buildah.sh b/mq-advanced-server-rhel/mq-buildah.sh index 8f6a75c..281f463 100755 --- a/mq-advanced-server-rhel/mq-buildah.sh +++ b/mq-advanced-server-rhel/mq-buildah.sh @@ -69,9 +69,6 @@ rm -rf ${mnt_mq}/var/cache/yum/* # Install MQ server packages into the MQ builder image ./mq-advanced-server-rhel/install-mq-rhel.sh ${ctr_mq} "${mnt_mq}" "${archive}" "${packages}" -# Remove the directory structure under /var/mqm which was created by the installer -rm -rf ${mnt_mq}/var/mqm - # Create the directory for MQ configuration files mkdir -p ${mnt_mq}/etc/mqm chown 888:888 ${mnt_mq}/etc/mqm