I have a java gradle project with multiple main class, i want to build a docker image with Jib and chose which main class to run when i execute docker run.
Is it possible to do this with Jib or i have to build multiple docker image for each main class i have ?
If i dont choose a mainclass in jib gradle config, it failed with :
Код: Выделить всё
Multiple valid main classes were found: ...
Код: Выделить всё
container {
entrypoint = ['/bin/sh', '-c', 'java -cp $( cat /app/jib-classpath-file ) MainClass']
}
Источник: https://stackoverflow.com/questions/781 ... ich-main-c