Add steps to minimize locale
When creating images like this, they are still quite large due to locale.
Consider adding steps from https://github.com/containers/buildah/issues/532 to your Dockerfiles.
E.g., for me, this here saved 200MB (build from fedora container, RHEL 8 would be the same). I'm not sure about --setopt=override_install_langs=en_US.utf8 in the context of Fedora / RHEL 8, the CLI argument might be different:
buildah unshare # only needed when not root, this will drop you in a new namespace
buildah from scratch
scratchmnt=$(buildah mount working-container)
yum install -y --releasever=32 --installroot=$scratchmnt --setopt install_weak_deps=false --setopt=tsflags=nodocs --setopt=override_install_langs=en_US.utf8 nodejs
rm $scratchmnt/usr/lib/locale/locale-archive* # this was needed as in my fedora32 environment, the lang override did not work
find $scratchmnt/usr/share/locale/ \! -name '*en*' -exec rm -rf \{\} \; # this was needed as in my fedora32 environment, the lang override did not work
rm -Rf $scratchmnt/var/cache/*
rm -Rf $scratchmnt/var/lib/rpm
Instead, install glibc-mininal-langpack from the start and avoid the problem entirely.
Oh sorry, I missed that this is already the case: glibc-minimal-langpack
Apologies for opening this issue, then.
I guess it's worth noting that the ubi7 dockerfile uses glibc and not glibc-minimal-langpack. The ubi8 dockerfile does use glibc-minimal-langpack.