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

江枫思渺然 提交于 2019-12-11 16:38:43

问题


Google App Engine just states about the usage of openjdk in app.yaml, Like

runtime_config:
   jdk: openjdk8
   server: jetty9

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

I want to use oracle jdk. How can I configure app.yaml to use oracle jdk

Note: I am using Google App Engine Flexible environment


回答1:


The config you referenced applies to the standard runtimes provided by Google, which does not come with the oracle jdk.

But you can use a custom runtime instead:

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.

You'd need to 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.

And you'd configure it like this in your app.yaml:

runtime: custom
env: flex


来源:https://stackoverflow.com/questions/48367184/how-oracle-jdk-can-be-configured-in-google-app-engine-flexible-environment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!