loading table of contents...

Deployment Manual / Version 2207

Table Of Contents Building Distroless Images

For Kubernetes deployments, it might be interesting to build distroless images. These are images, that contain only the JVM and the application but no shell. These images are, by nature, more secure. To build a distroless image, a second Maven profile should be added:

        </application.image-base> 1
                <jvmFlags> 2
                  <jvmFlag>-XX:MinRAMPercentage=45.0</jvmFlag> 3
                  <jvmFlag>-XX:MaxRAMPercentage=85.0</jvmFlag> 4
                   | <jvmFlag>-XX:+HeapDumpOnOutOfMemoryError</jvmFlag>
                   | <jvmFlag>-XX:HeapDumpPath=/tmp/app.hprof</jvmFlag>


go to and pick a hash


When building a distroless based image, there is only the JVM included and only environment variables and jvm flags are supported.


In Kubernetes the JVM memory is controlled by Kubernetes. In order to allow that, we need to define the upper and lower bound of the allocated pod memory using MinRAMPercentage and MaxRAMPercentage.

Search Results

Table Of Contents

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.