Docker Desktop Mac JVM Memory settings

Skip to first unread message

Ken Corey

Jan 20, 2020, 1:10:54 PM1/20/20
to docker-dev
Hi All,

I'm trying to run a build server for Android on a Mac mini (Mac OS 10.14.6).  I'm running Docker Desktop for Mac ( (40693)).

I inherited an image that has Jenkins installed on it, and the android SDK more-or-less installed.  Docker Desktop might have ben installed from homebrew, FWIW.

One of the issues I'm dealing with are seemingly random 'Out Of Memory' incidents.

The image had 2GB of Ram, and I've bumped it up to 4GB...but that hasn't changed the crashes much.

I've seen a couple articles like:

I understand that the JDK that I have installed cannot know how much memory it really should be having, and that I need to specify that the MaxRAMFraction of 4 shouldn't be used for the docker instance.

I should specify the memory for the jvm...but both web pages reference a Dockerfile.

So far so good...question is: 

if I'm using Docker Desktop for Mac, where's the relevant Dockerfile?

I can find the image file, but there's no Dockerfile there.

I've also read that Java 10 and Java 11 are smart enough to figure out they're inside docker and behave...but we haven't tried a recent Java with the app.  We're currently running 'openjdk version "1.8.0_212"'.  Must I upgrade the java on the machine?

Anyone know the secret to get this running in a more stable way?



Ken Corey

Jan 29, 2020, 8:06:55 AM1/29/20
to docker-dev
I cannot believe I'm the only person to run into this.

Have I posted to the wrong place?

Anyone know where better to post the question?


Reply all
Reply to author
0 new messages