you can enable Jar/BootJar tasks to build jar files inside the container.
reference: https://docs.spring.io/spring-boot/gradle-plugin/packaging.html
for docker container config: https://github.com/GoogleContainerTools/jib/blob/master/jib-gradle-plugin/README.md#build-to-docker-daemon