Java module how to increase docker memory capacity?

I am running into out of heap memory error. I’m wondering what is the memory limit of running docker container on Apeer? The program runs as expected on small size images. Prototyping the codes on local machine IDE runs as expected too even at large image size.
It could be a syntax to specify container memory. Any input?

Error log:

[ADK] Initializing
[ADK] Found “WFE_INPUT_JSON” to be “{“WFE_output_params_file”:“wfe_module_params_1_1.json”,“input_image”:”/input/module_0_0/a.tif"}"
[ADK] Successfully read “WFE_INPUT_JSON”. Output params will be written to “wfe_module_params_1_1.json”
Exception in thread “main” java.lang.OutOfMemoryError: Java heap space
at ij.ImageStack.getProcessor(
at com.apeer.modules.ApeerMain.main(


FROM maven:3-jdk-11 as builder

COPY . /usr/src/app

WORKDIR /usr/src/app

RUN mvn clean compile assembly:single

FROM openjdk:11-jre-slim

WORKDIR /usr/src/app

COPY --from=builder /usr/src/app/target/destitch-optosplit-image-1.0.0-jar-with-dependencies.jar .

CMD [ “java”, “-jar”, “destitch-optosplit-image-1.0.0-jar-with-dependencies.jar” ]

Hi Daniel,

the current memory limit is 12 GB. To avoid running out of memory, you might need to process the stack per layer.