Correction after building and running the fix on 18.5.0 + PostgreSQL 18:
Setting java.io.tmpdir through JAVA_OPTS (as I described in my previous comment) does NOT work. Tomcat's catalina.sh appends -Djava.io.tmpdir=$CATALINA_TMPDIRafter JAVA_OPTS, so with the JVM's "last -D wins" rule the default /usr/local/tomcat/temp still won - I confirmed the temp files kept landing there. Please disregard the JAVA_OPTS=-Djava.io.tmpdir=... workaround from my earlier comment.
The correct fix, now implemented and verified, is to set CATALINA_TMPDIR in tomcat/setenv.sh (catalina.sh only defaults it when empty, so it wins), plus the empty-on-start cleanup in xwiki/docker-entrypoint.sh. Verified on the running container: * JVM command line shows a single -Djava.io.tmpdir=/usr/local/xwiki/data/tmp (confirmed in Tomcat's own VersionLoggerListener log). * Temporary files (JODConverter, etc.) now land in /usr/local/xwiki/data/tmp on the mapped volume, no longer in /usr/local/tomcat/temp. * The directory is emptied on every container start (planted a marker file, restarted, it was gone). * XWiki boots normally (HTTP 200), no FileSystemException / "No space left on device".
Corrected workaround for the current image until a new one is published - set CATALINA_TMPDIR (not java.io.tmpdir via JAVA_OPTS) and pre-create the directory on the volume, e.g. in docker-compose: