Skip to content

Commit

Permalink
Fix: exec the java entrypoint in ash-template
Browse files Browse the repository at this point in the history
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
  • Loading branch information
yfyf committed Jul 21, 2016
1 parent 09c9c67 commit c1ba58d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ ${{template_declares}}
# If a configuration file exist, read the contents to $opts
[ -f "$script_conf_file" ] && opts=$(loadConfigFile "$script_conf_file")

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

0 comments on commit c1ba58d

Please sign in to comment.