Written by The Jahia Team
   Estimated reading time:

The Dockerfile used to generate the jahia/jahia image image is available here. The jahia/jahia image is used to run development, test, and production workloads. Its resource allocation depends on the use case.

Pull command docker pull jahia/jahia:8.0.0.0
Exposed port 8080 (HTTP), 7860 (TCP), 7870 (TCP)
Min/Max memory 4GB/16GB (allocated to the JVM)
vCPU requirements 4/8 vCPUs
Directory to be mounted as a volume none

The _fs Docker image stores the Jahia Datastore in a folder mounted as a volume:

Pull command docker pull jahia/jahia:8.0.0.0_fs
Exposed port 8080 (HTTP), 7860 (TCP), 7870 (TCP)
Min/Max memory 4GB/16GB (allocated to the JVM)
vCPU requirements 4/8 vCPUs
Directory to be mounted as a volume /datastore/jahia. See Volume management for more details.

Quick start

Docker run parameters

The start command of the Docker image is:

docker run -it [some docker options here] \
    -e PROCESSING_SERVER="true" \
    -e DB_HOST="{DB Hostname}" \
    -e DB_NAME="{DB Name}" \
    -e DB_USER="{DB Username}" \
    -e DB_PASS="{DB Password}" \
    -v /path/to/a/license.xml:/usr/local/tomcat/conf/digital-factory-config/jahia/license.xml:ro \
    jahia/jahia:8.0.0.0

where the license file is optional. If it is not passed, the default 30-day trial license applies instead.

Database schema import

The Database schema is automatically imported by Jahia during the first startup, and no manual action is required. If Jahia points to a Database already initialized, no schema import is done.

Additional configuration

Jahia can be configured by passing environment variables to the container at startup (see the Custom configuration deployment section to learn more).

Environment variable Default Description
DB_HOST mariadb  
DB_NAME jahia  
DB_USER jahia  
DB_PASS fakepassword  
SUPER_USER_PASSWORD fakepassword Jahia's root password
MAX_UPLOAD 268435456 Maximum file size upload to Jahia
OPERATING_MODE development Can be development or production
PROCESSING_SERVER false false for browsing container, true for processing one
MAVEN_XMX 256m Sets a maximum heap for maven
MAX_RAM_PERCENTAGE 25 Percentage of the system's memory to use as Tomcat's XMX (be aware that Jahia requires at least 2GB). On a typical workstation, the max RAM is the total memory of the system. If you use cgroup or k8s limits, then those limits override the overall memory limits available on the system.
RESTORE_MODULE_STATES true Restores the modules and their states from the database at startup (forced to false when database is empty). Useful when spinning up Jahia on a database that is already initialized.
LOG_MAX_DAYS 5 Sets container's logs retention rule
TZ   Passes a timezone to the container, for example “America/Toronto”
JAHIA_JAVA_OPTS   Used to pass JVM options for Jahia.
JAHIA_JAVA_XMS    
JAHIA_JAVA_XMX 2G  

Note that on top of these parameters, all jahia.properties and jahia.node.properties entries can also be configured by passing the associated environment variables.

Upgrading the jahia/jahia image

The upgrade of Jahia based on the jahia/jahia Docker image is a straightforward process:

  1. Stop the Jahia container or containers if you run a cluster.
  2. Start a new Jahia container in version n+1 that points to the same volume and database as the previous one.
  3. For clustered environments, once the first Jahia container has finished starting, all the others can be started at the same time.

The first container to start will upgrade the Database content. The following sequence of operations illustrates how to start a Jahia 8.0.0.0 container and upgrade it to Jahia 8.0.1.0, as long as both Jahia instances point to the same database schema.

docker run [docker options here] --name jahia8 -v /etc/jahia8/data:/data jahia/jahia:8.0.0.0
docker stop jahia8 && docker rm $_
docker run [docker options here] --name jahia8 -v /etc/jahia8/data:/data jahia/jahia:8.0.1.0

Upgrades to a version other than the next immediate version are not supported at the moment. Multiple restarts are required to upgrade by several versions. For multi-version Jahia cluster upgrades, only the processing node needs to be restarted for each version. See the How to upgrade procedure on the Customer Center. Non-processing nodes can be started in the final version directly once the processing has been upgraded.

Remote debugging

The Tomcat remote debug feature can be enabled so that you can use an IDE. This allows you to place a breakpoint and inspect the application's behavior at runtime. To do so, use the following parameters at runtime:

JAHIA_JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,address=*:8000,server=y,suspend=n -p  8080:8080 -p  8101:8101 -p 8000:8000

Your IDE can now connect to the remote debug port 8000 of Tomcat.

Binding a jCustomer instance to Jahia instance

Jahia can be bound to jCustomer via a configuration file deployed under /data/digital-factory-data/karaf/etc/. The file can be initialized manually or by using the following script:

echo "jexperience.jCustomerURL=https://127.0.0.1:9443" > jcustomer-settings.cfg &&
echo "jexperience.jCustomerPassword=jcustomerP@55" >> jcustomer-settings.cfg &&
echo "jexperience.jCustomerUsername=karaf" >> jcustomer-settings.cfg &&
echo "jexperience.jCustomerTrustAllCertificates=true" >> jcustomer-settings.cfg &&
echo "jexperience.jCustomerKey=XXXXXXXXXXXXX" >> jcustomer-settings.cfg

The file must then be passed to Jahia as a parameter:

docker run -it -v
jcustomer-settings.cfg:/data/digital-factory-data/karaf/etc/org.jahia.modules.jexperience.settings-global.cfg
<database connection configuration variables>
jahia/jahia:8.0.0.0