TLDR; Intro to Docker, it's good for Microservices. Container memory limits kills your process, and if you leave the application to use default memory limits, it will get them from Docker's VM and get them wrong. If it counts as a Server, as opposed to a Client (2 or more processors, or more then 2gb of ram), it will allocate 1/4 of the available memory immediately. All of this can be overridden using the JVM Options we should all be familiar with. If using JRE 8, use latest security updates, and it won't be a problem, as it can see CGroup memory limits. Java 9 is not patched. Java versions 10 and 11 you may need to check for correct flags to use. Java 12 is Fine.