Skip to Content
Hands-On Microservices with Spring Boot and Spring Cloud
book

Hands-On Microservices with Spring Boot and Spring Cloud

by Magnus Larsson
September 2019
Intermediate to advanced
668 pages
15h 59m
English
Packt Publishing
Content preview from Hands-On Microservices with Spring Boot and Spring Cloud

Challenges with running Java in Docker

When it comes to Java, over the past few years, there have been a number of attempts to get Java working in Docker in a good way. Currently, the official Docker image for Java is based on OpenJDK: https://hub.docker.com/_/openjdk/. We will use Java SE 12 with the Docker tag openjdk:12.0.2, that is, Java SE v12.0.2. 

Java has historically not been very good at honoring the quotas specified for a Docker container using Linux cgroups; it has simply ignored these settings. So, instead of allocating memory inside the JVM in relation to the memory available in the container, Java allocated memory as if it had access to all the memory in the Docker host, which obviously isn't good! In the same way, Java allocated ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Master Microservices with Spring Boot and Spring Cloud

Master Microservices with Spring Boot and Spring Cloud

In28Minutes Official

Publisher Resources

ISBN: 9781789613476Supplemental Content