Build and Run a Custom XWiki Docker Image

Last modified by Eleni Cojocariu on 2026/04/29 08:30

Steps

Warning

WIP

To build and run a custom XWiki Docker image:

  1. Install Git.
  2. Run the following command to clone the repository:
    git clone https://github.com/xwiki/xwiki-docker.git
  3. Go to the /docker-xwiki directory.
  4. Choose the directory matching your setup:
    cd <cycle_version>/mysql-tomcat

    For example, 17/mysql-tomcat for  latest released XWiki version of the  17.x cycle running on Tomcat and for MySQL, or 17/postgres-tomcat for XWiki 17.x + PostgreSQL. 

  5. Modify the DockerFile in that directory as you wish.
  6. Build and start the containers: docker compose up. This will automatically build the Docker image on the first run.
  7. Rebuild the image: docker compose up --build . This creates a new Docker image locally based on your modifications.
  8. Access XWiki: open your browser and go to http://localhost:8080/ once XWiki is started.

FAQ

Is there any other method to build the image?

Yes, you can:

  • build the image with a specific name and tag, for example: docker build . -t name:tag,
  • build the image with a more generic name: docker build -t xwiki and then use the instructions from above to start XWiki and the database using docker run.

More

To find more about the current topic, you can search or use the table below and filter the columns to narrow your choices.

Get Connected