There is 1 comment.
 
 
XWiki Docker images / cid:jira-generated-image-avatar-d621177c-e8c9-4d54-abb8-5ad9df03ce5f XDOCKER-177 Closed

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

 
View issue   ยท   Add comment
 

1 comment

 
cid:jira-generated-image-avatar-c504e2c1-0a26-453d-8263-d6191ca67ebd Vincent Massol on 18/Jul/26 17:13
 
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/|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 {{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 {{JAVA_OPTS}} . With docker \ -compose, add them to the "web" service \ (directly or via .env \ ):

{code}
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
{code}

Or with plain docker run:
\ {{ -e JAVA\_OPTS 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 {{JAVA_OPTS}} doesn't cover your use case.