Help with Java error showing up when running Dependency Track in Docker Desktop

Hi,

Windows 10 Pro x64
Core i7/16GB memory
Docker Desktop v4.60.1

I’m somewhat of a neophyte with Docker, but I was able to successfully set it up and run OWASP Dependency Track a few weeks ago and everything was moving along fine, then this morning the apiserver wouldn’t start and started kicking out an error: 2026-02-14 11:45:55.929 | 2026-02-14 16:45:55,929 ERROR [RequirementsVerifier] Dependency-Track requires a minimum of 4GB RAM (heap). Cannot continue. To fix, specify -Xmx4G (or higher) when executing Java. I’ve spent several hours working on it but I can’t find any definitive steps on how to fix it. How does Docker start Java? I looked at the resource settings in Docker and it says 'You are using the WSL 2 backend, so resource limits are managed by Windows.’ and refers me to ‘C:\Users[my user name]\AppData\Local\Docker\wsl’, but there are only two subfolders under that with no config files. I looked at ‘WSL Settings/Memory and Processor’ and the memory is set to 16GB. Can someone describe how I can increase the memory size for Java? Do I have to edit some config file in the underlying WSL? This is driving me crazy and I have to have this analysis finished by Monday.

Thanks

John

The container starts an entrypoint script and uses commands as arguments to the entrypoint script. In absence of a entrypoint script, it starts whatever is defined as command. Every image has it’s own definition for entrypoint scripts and commands. Docker doesn’t start java. It starts what I wrote above.

THe image maintainer is responsible to start the main process of a container. Usually the image maintainers use env variables that are processed by the entrypoint script to influence how the main process is started. You might want to look at the image description on Docker Hub, and the documentation it links to.

The image description says it requires a minimum of 4,5GB ram and recommends 16GB.

Where did you do that? Using the “WSL Settings” app? Or in %USERPROFILE%\.wslconfig? I doubt WSL2 is able to use 16GB ram of 16GB ram. Your OS and all processes it runs + all processes Docker Desktop require will already occupy some of your 16GB ram. So in reality WSL2 will have way less available.

Update: here are the docs:

Since it was a Java error message and the error message even shared the solution, I would pass the mentioned arguments to java so the java process can use that amount of heap memory. I guess it could run without that before and for any reason now it needs more.

I wouldn’t change WSL config, just container parameters. @meyay explained most of what you need, but here is a discussion about changing parameters through env variables: https://stackoverflow.com/a/417222

it should work in containers too.

Update:

Actually @meyay explained everything. The updated post contains the link to the documentation mentioning this variable:

  # - EXTRA_JAVA_OPTIONS=

Thank you! Now for the next dumb question - where in the Docker Desktop UI can I change the parameters that are passed to Java? I tried clicking on the apiserver container then ‘Inspect’ which seems to show the java startup command, but it won’t let me edit it.

Why do you want to do it through the UI? The documentation shows a compose file example. how did you start the container originally? The desktop UI is not for changing parameters.

I downloaded Docker Desktop, installed it, started it up then opened a command window and ran the following two commands:

curl -LO https://dependencytrack.org/docker-compose.yml
docker compose up -d

That was it - I just pointed a browser to localhost:8080 and logged into dependency track with no problem. Once again apologies for basic questions - do I need to download and edit the docker-compose.yml locally for add the java command line option?

You already downloaded the compose file. That is what curl does. You couldn’t have run docker compose command otherwise. Now you have to change the content of that file.

I found docker-compose.yml in the system32 folder and changed the ‘memory’ value from ‘4G’ to ‘8G’ and uncommented EXTRA_JAVA_OPTIONS and changed it to EXTRA_JAVA_OPTIONS: “-Xmx4G” but I’m still getting the same error. Did I make the correct edits?

Did you run it again?

Yes, and it gave me an error ‘EXTRA_JAVA_OPTIONS’ not allowed, so I commented that line back out and now it seems to be working with just the ‘memory = 8g’ change. Thanks for you help - now I understand Docker a lot better.

When you get an error message it is best if you share it. Othrwise there is no way we can tell you what is wrong. In the previous message you wrote you got the same error, but after @bluepuma77’s comment you wrote you got an error saying the variable was not allowe.d. I can only guess that you made a mistake in the indentation of the saml so where you left the environment variable, it was not in the right place and docker said that the compose file was invalid and insteadof interpreting the env variable, it was seen as a parameter like “image:” or “command:” under the service definition. Withut the actual error message, I could just guess and since it already works for you, it doesn’t matter. Unless the error message comes back. If the error message appeared after you already used the service for a while, it can come back the same way.

Thank and apologies for not providing more data. Once I commented out the ‘EXTRA_JAVA_OPTIONS’ and just left the ‘memory = 8g’ the problem went away, so I didn’t think about the EXTRA_JAVA_OPTIONS again.

No problem. Happy “Dockering”!