Skip to content

Commit b052830

Browse files
yfyfmuuki88
authored andcommitted
Fix: exec the java entrypoint in ash-template (#850)
The bash-template correctly correctly wraps the `java` entrypoint in `exec`: https://github.com/sbt/sbt-native-packager/blob/73cc27a920b8162fa55dafc4897acd160707837e/src/main/resources/com/typesafe/sbt/packager/archetypes/bash-template#L249-L255 https://github.com/sbt/sbt-native-packager/blob/73cc27a920b8162fa55dafc4897acd160707837e/src/main/resources/com/typesafe/sbt/packager/archetypes/bash-template#L136 however here it was missing. This causes issues when using Docker, because exit signals are not passed onto the java process, so e.g. Ctrl-C doesn't stop the running application. See here for details on why this is needed in Docker: https://docs.docker.com/engine/reference/builder/#exec-form-entrypoint-example
1 parent 73cc27a commit b052830

File tree

1 file changed

+1
-1
lines changed
  • src/main/resources/com/typesafe/sbt/packager/archetypes

1 file changed

+1
-1
lines changed

src/main/resources/com/typesafe/sbt/packager/archetypes/ash-template

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ ${{template_declares}}
4242
# If a configuration file exist, read the contents to $opts
4343
[ -f "$script_conf_file" ] && opts=$(loadConfigFile "$script_conf_file")
4444

45-
java -classpath $app_classpath $opts $app_mainclass $@
45+
exec java -classpath $app_classpath $opts $app_mainclass $@

0 commit comments

Comments
 (0)