Docker custom base image for the intel runtime

I have a few questions related to the docker base image for my application (which is a c++ app having the intel ipp/tbb runtime driven by bash shell scripts). I started with the RHEL7.6 base image (which is 360 MB) and installed the required runtime related to my application which involves installation of intel ipp/tbb libraries and some other dependencies along with the bash shell scripts. Finally, my application’s image size has come around 9.5 GB with all the installations I did inside the container which started from the 360 MB image. In fact, I committed the running container (using docker commit) with all the required runtime to get that 9.5GB custom image for my application. Is this the right way, that i should do to create the custom image for my application? Its not like i’m using the fullOS in my container

Also, I need to set the hugepages and shmmax in my container. Do i need to configure these inside the container or I shall need to make use of these settings in the docker host?

Figured out… It was due to the /var/cache/yum…
Did yum clean all and reclaimed 6G space…