The WaveMaker app-runtime-tomcat Docker image is a lightweight, production-optimized container specifically designed for deploying WaveMaker application WAR files. Based on the Tomcat server, it provides a standardized, reliable environment for easy deployment.
To deploy a WAR file created by the app-builder image, mount it into the Tomcat webapps directory within the container using the following command:
docker run -d --name <container-name> -v <your_project_location>/dist/:/usr/local/tomcat/webapps/ -p <host_port>:8080 wavemakerapp/app-runtime-tomcat:<wavemaker_version>
Example:
docker run -d --name wm-app -v /home/user/MySampleApp/dist/:/usr/local/tomcat/webapps/ -p 80:8080 wavemakerapp/app-runtime-tomcat
Note: The app-runtime-tomcat image is designed to work with a WAR file from the app-builder image. This two-step workflow — first building the WAR file with app-builder, then deploying it with app-runtime-tomcat — enhances modularity and ensures a streamlined, reliable deployment process.
Alternatively, if you already have a WAR file from another source, you can deploy it directly by mounting it to the webapps directory as shown above.
By default, Java picks a heap size automatically based on the available memory. You can override this and other JVM sizing options with environment variables:
| Variable | What it does | Default |
|---|---|---|
MIN_HEAP_SIZE_MB | Memory Java reserves at startup (MB) | JVM default |
MAX_HEAP_SIZE_MB | Memory Java is allowed to grow to (MB) | JVM default |
MIN_META_SIZE_MB | Initial Metaspace size (MB) | JVM default |
MAX_META_SIZE_MB | Maximum Metaspace size (MB) | JVM default |
THREAD_STACK_SIZE_KB | Thread stack size (KB) | JVM default |
NATIVE_MEMORY_TRACKING | Native memory tracking level: summary, detail, or off | summary |
EXTRA_JAVA_OPTS | Any other JVM flag, e.g. -XX:+UseG1GC | None |
docker run -d --name wm-app \
-v /home/user/MySampleApp/dist/:/usr/local/tomcat/webapps/ \
-p 80:8080 \
-e MIN_HEAP_SIZE_MB=512 \
-e MAX_HEAP_SIZE_MB=2048 \
wavemakerapp/app-runtime-tomcat:<wavemaker_version>
If the app ever runs out of memory, the container automatically:
/usr/local/tomcat/logs/heap-dumps/ — a snapshot you can open in a tool like Eclipse Memory Analyzer (MAT) to see what was using all the memory.Because the app stops, you need to tell Docker to restart it automatically with --restart on-failure. And to actually retrieve the heap dump afterwards, mount the logs folder to your host with -v:
docker run -d --name wm-app \
--restart on-failure \
-v /home/user/MySampleApp/dist/:/usr/local/tomcat/webapps/ \
-v /home/user/logs:/usr/local/tomcat/logs \
-p 80:8080 \
wavemakerapp/app-runtime-tomcat:<wavemaker_version>
| Variable | What it does | Default |
|---|---|---|
HEAP_DUMP_KEEP | Number of past heap dumps to keep on disk | 5 |
If the app keeps running out of memory, the cause is almost always in the application code — something like a cache or list that keeps growing and is never cleared. Open the heap dump in Eclipse MAT and check the "Leak Suspects" report; it usually points straight at the cause.
Garbage collection logs are written to /usr/local/tomcat/logs/gc.log by default.
| Variable | What it does | Default |
|---|---|---|
GC_LOGGING_ENABLED | Turn GC logging on/off | true |
GC_LOG_FILECOUNT | Number of rotated log files to keep | 5 |
GC_LOG_FILESIZE_MB | Max size (MB) of each log file before rotation | 10 |
-e GC_LOGGING_ENABLED=false
Content type
Image
Digest
sha256:f87526d60…
Size
215.4 MB
Last updated
2 months ago
docker pull wavemakerapp/app-runtime-tomcat