Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Setting Context Path for Confluence running in a docker container

zirnsak
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 15, 2019

I'm trying to run confluence in a docker container using the official atlassian/docker-confluence image from dockerhub.

There are some working environment variables, for instance (ansible yaml):

{code}

- name: create confluence container
  docker_container:
    name: 'confluence'
    hostname: 'confluence'
    image: 'atlassian/confluence-server'
    state: started
    restart_policy: unless-stopped
    cacert_path: '/etc/pki/tls/certs/ca-bundle.crt'
    network_mode: host
    volumes:
      - '{{ confluence_docker__data_dir }}:/var/atlassian/application-data/confluence'
    env:
      JVM_MINIMUM_MEMORY: '512m'
      JVM_MAXIMUM_MEMORY: '4096m'
      JVM_SUPPORT_RECOMMENDED_ARGS: '-Djavax.net.ssl.trustStore=/var/atlassian/application-data/confluence/cacerts -Dhttp.proxyHost=...'
      CONFLUENCE_DB_HOST: 'localhost'
      CONFLUENCE_DB_PORT: '5432'
      CONFLUENCE_CONTEXT_PATH: '/confluence'

{code}

what I get is the following java process:

{code}

/opt/java/openjdk/bin/java -Djava.util.logging.config.file=/opt/atlassian/confluence/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -XX:ReservedCodeCacheSize=256m -XX:+UseCodeCacheFlushing -Dconfluence.context.path= -Datlassian.plugins.startup.options=-fg -Dorg.apache.tomcat.websocket.DEFAULT_BUFFER_SIZE=32768 -Dsynchrony.enable.xhr.fallback=true -Xms512m -Xmx4096m -Djavax.net.ssl.trustStore=/var/atlassian/application-data/confluence/cacerts -Dhttp.proxyHost ...

{code}

I would expect, that {{-Dconfluence.context.path=}} is not empty, but it is.

Do I use the wrong environment variable?

Thank you very much for your help!

1 answer

1 accepted

1 vote
Answer accepted
Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 17, 2019

Hello there!

Looking at the Docker page for Confluence:

Docker Hub - Confluence Server

We have this variable:

CATALINA_CONTEXT_PATH

It's default value is none, so no context path is set. So you can try changing from CONFLUENCE_CONTEXT_PATH to CATALINA_CONTEXT_PATH.

Let us hear from you!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events