I have a typical Spring Boot 2.x application. I'm currently deploying the application using Docker. I'm also using the built-in shell script that a "distribution" provides — when done via Gradle, read: assembleBootDist, installBootDist, etc.
The issue is that I have to execute (a) some other shell script before starting the application, (b) insert this shell script somehow the built-in one, (c) or something else that achieves the same.
So I wonder if there is a way to accomplish this in a clean way, without introducing any security concerns, etc. I've been trying to plug into the bootStartScripts (Gradle) task, but no luck there. I'm aware there is a launchScript property within bootJar, but as far as I can tell it replaces altogether the actual built-in script provided by Spring Boot — and I'm avoiding that.
Any other shell-fu would also work, provided nothing around security is compromised.