How to set Java heap size (Xms/Xmx) inside Docker container?

后端 未结 5 443
囚心锁ツ
囚心锁ツ 2020-12-05 06:56

As of raising this question, Docker looks to be new enough to not have answers to this question on the net. The only place I found is this article in which the author is say

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-05 07:21

    Note that in a docker-compose.yml file - you'll need to leave out the double-quotes:

      environment:
      - JVM_OPTS=-Xmx12g -Xms12g -XX:MaxPermSize=1024m
    

    or

      environment:
      - CATALINA_OPTS=-Xmx12g -Xms12g -XX:MaxPermSize=1024m
    

提交回复
热议问题