I had the same issue where everything worked fine locally with Spring Boot, but failed when running in Docker. Adding the following dependencies resolved the problem:
implementation 'net.sf.jasperreports:jasperreports-jdt:7.0.1'
implementation 'org.eclipse.jdt:ecj:3.21.0'