Skip to content
Snippets Groups Projects
README.md 1.5 KiB
Newer Older
Fabio Mancinelli's avatar
Fabio Mancinelli committed
# Introduction

This project contains the Dockerfile for building a container running XWiki 7.0 on Tomcat with MySQL as a database.

# Building

Just run `docker build .` and you should have your image ready in your docker repository.

# Running

When running the container you must specify the following information:

* Where to mount `/var/lib/mysql` for database stored data.
* Where to mount `/var/lib/xwiki` for XWiki permament data.
* Where to map port 8080.

Not specifying mount points will make data stored in the wiki disappear when the container is stopped.

Not specifying the port mapping will make XWiki inaccessible from the host.

Here it is the command line to use for starting the XWiki container:

    docker run -v HOST_DIR_FOR_XWIKI_DATA:/var/lib/xwiki -v HOST_DIR_FOR_MYSQL_DATA:/var/lib/mysql -p HOST_PORT_FOR_ACCESSING_XWIKI:8080 CONTAINER_ID

Once the container is started, you can open a browser and connect to `http://host:HOST_PORT_FOR_ACCESSING_XWIKI/xwiki`

## Making data dir accessible

In order to make `HOST_DIR_FOR_XWIKI_DATA` and `HOST_DIR_FOR_MYSQL_DATA` accessible by the container, they must be executable and writable by the `tomcat7` (`UID 101`, `GID 102`) and `mysql` (`UID 103`, `GID 104`) container users - which might not exist in your host.

In order to avoid writing problems do a `chown 101:103` on `HOST_DIR_FOR_XWIKI_DATA`, and `chown 102:104` on `HOST_DIR_FOR_MYSQL_DATA`.

# Disclaimer

I still need to find a way to shut things down gracefully, so do not use this in production :)

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.