When creating Docker images for a Springboot project using the Palantir Docker plugin I found no easy way to pick up the fat jar from the bootRepackage task.
One way around this is to set each the jar and the bootRepackage tasks as dependencies. The jar tasks provides the output (which the Docker plugin will pick up) and the bootRepackage actually generates the proper file (with the same name).
Provide a fixed name for the jar, so it's easier to refer from the Dockerfile:
This will generate ofnir-app.jar.
Then a Dockerfile can be as simple as: