如何正确更改Dokku应用容器中的Java运行时?

huangapple go评论59阅读模式
英文:

How to properly change Java Runtime on Dokku app container?

问题

我正在服务器上的Dokku容器内运行Ktor后端应用程序。默认情况下似乎使用的是Java 8。我应该如何正确地将Dokku容器上的Java运行时更改为Java 11?

我不确定是否应该进入Dokku应用程序容器并更新Java,还是在Dokku或我的Ktor项目中是否有可用的配置,或者是否还有其他方法。

英文:

I'm running a Ktor backend app inside of a Dokku container on a server. It seems that by default Java8 is used. How can I properly change Java Runtime on dokku container to be Java 11?

I'm not sure if I should enter the dokku app container and update the Java, or is there some configuration available that I can use either on the dokku or my Ktor project side, or something else.

答案1

得分: 1

If deploying via the official Heroku buildpack for Java, you can specify a java.runtime.version in your system.properties as documented here.

example:

java.runtime.version=11
英文:

If deploying via the official heroku buildpack for java, you can specify a java.runtime.version in your system.properties as documented here.

example:

java.runtime.version=11

huangapple
  • 本文由 发表于 2023年3月9日 19:22:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/75683928.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定