Multiple tools in one docker image?

Hi all,
I haven’t used yet and would like to ask for your recommendations regarding how to cope with a requirement when in an environment (i.e.: CI/CD) there are different programming tools needed. An example is when gradle triggers another tool (compiler) so there is a chain of tools triggered. I have a docker image with gradle but don’t have the other tool (compiler) in this image.
How to cope with it ? Do I need to build special docker image containing all required tools or … ?