Using Java-Based Containers

The MATRIXX gateways and web apps are provided as Java-based images that can create configurable containers.

Containers, being stateless, are always created with the same default, out-of-the-box configuration. Any changes you want to make to this configuration must originate outside of the container if they are to persist. There are two ways to achieve this:

  • Mounting a directory containing configuration files to be read by the application.
  • Setting environment variables in the container at start-up.

Mounting storage external to the container gives the container access to application configuration in the form of YAML, XML, or properties files. Setting and changing the values of environment variables is useful for adjusting the way in which the process runs. For example, modify environment variable values to change the parameters of the Java Virtual Machine (JVM) or the amount of time a container should wait for a resource before timing out.

Note: Although you can use the docker exec command to make configuration changes in a running Docker container, such changes are not typically loaded until the next time the application restarts. Because software processes as containers tend to be recreated rather than restarted, changes made in this way are likely to be lost.

For information about where messages are logged, see the discussion about Java-based Docker container logging in MATRIXX Monitoring and Logging.