There is 1 update, 1 comment.
 
 
XWiki Docker images / cid:jira-generated-image-avatar-18282ede-4145-4cbf-85fe-433d4a5ac7d7 XDOCKER-177 Open

Need to be able to make xwiki proxy-aware via docker-compose

 
View issue   ยท   Add comment
 

1 update

 
cid:jira-generated-image-avatar-f246a986-f24d-4558-8d2d-7b5907c13f6d Changes by Vincent Massol on 18/Jul/26 10:28
 
Assignee: Vincent Massol
 
 

1 comment

 
cid:jira-generated-image-avatar-f246a986-f24d-4558-8d2d-7b5907c13f6d Vincent Massol on 18/Jul/26 10:18
 

First, a quick note: jira.xwiki.org is our issue tracker for bug reports and feature requests, not a place to ask questions. For questions and help, please use the community forum at https://forum.xwiki.org/ where the community can assist you.

Regarding your request: XWiki running in the Docker image can already be made proxy-aware without editing the running container. The image lets you pass any JVM system property through the JAVA_OPTS environment variable (see the "Passing JVM Options" section of the README), and tomcat/setenv.sh preserves whatever you set there.

Since the JVM's proxy support is driven by standard system properties, you just pass them via JAVA_OPTS. With docker-compose, add them to the "web" service (directly or via .env):

services:
  web:
    environment:
      \- JAVA\_OPTS=\-Dhttp.proxyHost=proxy.example.com \-Dhttp.proxyPort=3128 \-Dhttps.proxyHost=proxy.example.com \-Dhttps.proxyPort=3128 \-Dhttp.nonProxyHosts=localhost|127.0.0.1|db

Or with plain docker run: -e JAVA_OPTS="-Dhttp.proxyHost=... -Dhttp.proxyPort=... -Dhttps.proxyHost=... -Dhttps.proxyPort=..."

These flags are merged with the image's default JVM options (memory, encoded-slash handling, etc.), so nothing is lost. Given this already works out of the box, I'm closing this issue. Please continue the discussion on the forum if JAVA_OPTS doesn't cover your use case.