Instead of maintaing a buld container who's building the code, we can move to multi-stage, where the code for what used to be the build container is going to be the first stage (usually called 'builder') and then the 2nd stage will be the build itself, for example the RPM creation.
See a random example (StackRox) - https://catalog.redhat.com/software/containers/advanced-cluster-security/rhacs-collector-rhel8/60b92f75abb52c7e88ebc964?container-tabs=dockerfile
Instead of maintaing a buld container who's building the code, we can move to multi-stage, where the code for what used to be the build container is going to be the first stage (usually called 'builder') and then the 2nd stage will be the build itself, for example the RPM creation.
See a random example (StackRox) - https://catalog.redhat.com/software/containers/advanced-cluster-security/rhacs-collector-rhel8/60b92f75abb52c7e88ebc964?container-tabs=dockerfile