I have a Spring Boot app which is built to a docker image by mvn spring-boot:build-image
. When it runs it prints out a warning:
WARNING: Container memory limit unset. Configuring JVM for 1G container.
Calculated JVM Memory Configuration: -XX:MaxDirectMemorySize=10M -Xmx192915K -XX:MaxMetaspaceSize=343660K -XX:ReservedCodeCacheSize=240M -Xss1M (Total Memory: 1G, Thread Count: 250, Loaded Class Count: 58260, Headroom: 0%)
Now this message seems to appear regardless a machine which it runs on. Whether it's on my local Docker Desktop on Windows or in AWS instance with 2 or 4 GB RAM. I'm not happy with the 200M set for maximum heap size...
Is there a bug in memory calculation or can I tweak it somehow?
UPDATE: I'm using Dockerrun.aws.json v1 in order to deploy to Beanstalk. So I guess I have no control over docker run arguments.