SIGTERM not received by java process using 'docker stop' and the official java image

后端 未结 2 567
既然无缘
既然无缘 2020-12-23 20:38

I am running a dropwizard Java application in a Docker container using the image java:7u79 based on debian/jessie.

My Java application hand

2条回答
  •  礼貌的吻别
    2020-12-23 21:41

    @h3nrik answer is right but sometimes you really need to use a script for setup the launch. Just use the exec command to do the trick in most of the cases:

    #!/bin/sh
    
    #--- Preparations
    
    exec java -jar ...
    

    See this wonderful blog post

提交回复
热议问题