Build and Run a Custom XWiki Docker Image
Last modified by Eleni Cojocariu on 2026/04/29 08:30
Steps
To build and run a custom XWiki Docker image:
- Install Git.
- Run the following command to clone the repository:
git clone https://github.com/xwiki/xwiki-docker.git - Go to the /docker-xwiki directory.
- Choose the directory matching your setup:
cd <cycle_version>/mysql-tomcatFor example,
17/mysql-tomcatfor latest released XWiki version of the 17.x cycle running on Tomcat and for MySQL, or17/postgres-tomcatfor XWiki 17.x + PostgreSQL. - Modify the DockerFile in that directory as you wish.
- Build and start the containers:
docker compose up. This will automatically build the Docker image on the first run. - Rebuild the image:
docker compose up --build. This creates a new Docker image locally based on your modifications. - 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 xwikiand 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.