Build and Run a Custom XWiki Docker Image
Last modified by superadmin on 2026/11/25 21:33
Clone the xwiki-docker repository, change its Dockerfile, build the image under your own tag and start it with Docker Compose.
Steps
- Install Git.
- Run the following command to clone the repository:
git clone https://github.com/xwiki/xwiki-docker.git - Go to the xwiki-docker directory created by the clone.
- Choose the directory matching your setup:
cd <cycle_version>/mysql-tomcatFor example, 18/mysql-tomcat for the latest released XWiki version of the 18.x cycle running on Tomcat and for MySQL, or 18/postgres-tomcat for XWiki 18.x + PostgreSQL.
- Modify the Dockerfile in that directory as you wish.
- Build the image, giving it a tag of your own:
docker build -t my-xwiki . - In docker-compose.yml, point the web service at your build by replacing its image value:
image: "my-xwiki" - Start the containers:
docker compose up. - 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.