How do I use docker image to create a container in Jenkins to compile github repo code?

Jenkins runs on the server. What I want is that every time push commit comes to this github repo, Jenkins uses a docker image to create container to compile the entire project. How do you do that? This project is so big that it is impossible to create a new container every time and then put the code in it and compile it. Is there any good idea? Can I use Jenkins pipline to do this?

Mar.28,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e40566-448bd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e40566-448bd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?