Why does XWiki docker edit some XWiki config in the entrypoint?

Hello,

I tried to overwrite xwiki.cfg in Kubernetes using a ConfigMap and mounting the volume to the /usr/local/tomcat/webapps/ROOT/WEB-INF/xwiki.cfg file path. Because of the ConfigMap, this is a RO mount. This had worked for the xwiki.properties without problems (instructions taken from image docs).

With the xwiki.cfg overwrite, the XWiki instance could not be started anymore because it tried to cp a xwiki.cfg file from /usr/local/xwiki/data to /usr/local/tomcat/webapps/ROOT/WEB-INF in a read-only filesystem. I did not mount the overwrite file to /usr/local/xwiki/data. I found some instances in the Docker entrypoint where the xwiki config would be changed:

  • xwiki_set_cfg ‘xwiki.webapppath’ ‘’
  • xwiki_set_properties ‘environment.permanentDirectory’ ‘/usr/local/xwiki/data’
  • xwiki_set_properties ‘openoffice.autoStart’ ‘true’

Why does the Entrypoint not rely on the values in the (default or mounted) config for these values? Because it crashed for me after the log line Deploying XWiki in the ‘$CONTEXT_PATH’ context, I think this line in docker-entrypoint.sh could be related xwiki_set_cfg ‘xwiki.webapppath’ ‘’xwiki_replace /usr/local/tomcat/webapps/$CONTEXT_PATH/WEB-INF/xwiki.cfg “$1” “$2” → which does a cp.

If the app is deployed in the ROOT context, and this is set in the env + config, why does it try to set this option?