There is 1 comment.
 
 
XWiki Docker images / cid:jira-generated-image-avatar-dfad2d34-b109-4667-b4f8-0e05b11dc00b 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-9c93a700-612c-4d23-8694-24734d7386cd Vincent Massol on 18/Jul/26 12:48
 
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 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\):

{code}
services:
  web:
    environment:
      \ - JAVA\_OPTS 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="\-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.