I am trying to set up a microservice in Amazon ECS. How can JVM arguments be configured and passed to the microservice?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
We do this sort of thing by passing them as env
variables on the task. When you edit your container in your task, scroll down to the Env Variables
section:
You can then reference these as normal env
variables on the command line when you launch your application.
回答2:
You can set an ENTRYPOINT in your Dockerfile like: ENTRYPOINT ["java","-Xms1024m","-Xmx1800m","-jar","/app.jar"]