Dockerized Spring Boot application with embedded Jetty exits with code 143 on issuing docker stop

I have a Spring Boot web application with embedded Jetty running in a container. When the container is stopped with docker stop it exits with code 143 which is SIGTERM. I understand that docker stop issues a SIGTERM to the main process. I am wondering if 143 is the code to be expected i.e. that is the expected behavior or should it be 0.

  • This process is running with pid 1.
  • The application has no additional code except the one generated by Spring Initializr at the moment to analyze behavior.

Any pointers/documentation which defines this behavior to be correct/incorrect would be great.

Source: StackOverflow