I have a Spring Boot app (on Kotlin), launching in Docker. There are the docker-compose file (2 only services there - this spring boot app (restart: on-failure) & postgres (restart doesn't set)), and the dockerfile in app looks like this:
FROM gradle:...
COPY --chown=gradle:gradle...
...
RUN ...
RUN ...
WORKDIR gradle build --no-daemon
FROM openjdk:...
RUN mkdir ...
COPY ...
ENTRYPOINT ["java", ..., "app.jar"]
What reasons there can be? Is it possible, that process other than JVM gets PID 1 (and termination command goes to process with PID 1, according to this point https://snyk.io/blog/best-practices-to-build-java-containers-with-docker/#:~:text=Properly%20handle%20events%20to%20safely%20terminate%20a%20Java%20Docker%20web%20application). Or it doesn't matter, because here "ENTRYPOINT" command (not "CMD" as in article) is used?
I am new in docker & gradle, will be happy for any help.