dotCMS images use the S6 Overlay system for configuration and initializtion. You can read more about that system here: https://github.com/just-containers/s6-overlay
For templatization of our configuration, we also use dockerize: https://github.com/jwilder/dockerize