如何在 Google App Engine 柔性环境中配置 oracle jdk

How oracle jdk can be configured in Google App Engine Flexible environment

Google App Engine 仅在 app.yaml 中说明了 openjdk 的用法,喜欢

runtime_config:
   jdk: openjdk8
   server: jetty9

参考:https://cloud.google.com/appengine/docs/flexible/java/configuring-your-app-with-app-yaml

我想使用 oracle jdk。如何配置 app.yaml 以使用 oracle jdk

注意:我正在使用 Google App Engine 柔性环境

您引用的配置适用于 Google 提供的标准运行时,它不包含 oracle jdk。

但您可以使用 custom runtime 代替:

Use a custom runtime in the App Engine flexible environment to use an alternative implementation of Java, Python, Node.js, or Go, or write code in any other language. Defining new runtime environments allow you to include additional components like language interpreters or application servers.

您需要 build it:

To create a custom runtime you need:

  • An app.yaml file that describes your application's runtime configuration.
  • A Dockerfile that configures the runtime environment. In many cases, this can be just one line specifying a base image.
  • To ensure your application is listening on port 8080 and has request handlers that respond to lifecycle events, such as start, stop, and health check requests.

    Note: Google supplies base images that you can customize, but you aren't required to use these. You can use other images so long as they satisfy the conditions in the bulleted list above.

你会 configure 在你的 app.yaml:

中这样
runtime: custom
env: flex