Why a new Docker Dokuwiki image?
Simple really. I couldn’t find a simple, easy to configure Dokuwiki Docker image.
- github-tags-en smileys by Davidjimenez7
- The Bootstrap 3 theme by Giuseppe Di Terlizzi
- Clean URL’s using .htaccess (via mod_rewrite).
Initially, I followed Logan Marchiones “The ‘best’ way to run DokuWiki in Docker” guide and yes it gave me the ability to add the features I wanted BUT it was a bit TOO manual for my liking, especially as I wanted to use Docker to simplify my setup, so ultimately I created my own image.
I actually ran this in “Production” for over a month, and it works really well, before migrating to my new image.
Where is the new image kept?
The image is available on DockerHub
docker pull alandoyle/dokuwiki:latest
How to use this new image?
Using the image is really simple.
It can be run via commandline:
docker run --name=dokuwiki \ -d --init \ -v <MY_CONF_PATH>:/var/www/html/conf \ -v <MY_DATA_PATH>:/var/www/html/data \ -p 8000:80/tcp \ alandoyle/dokuwiki:latest
Or via Docker compose:
version: "3" services: dokuwiki: image: alandoyle/dokuwiki:latest container_name: dokuwiki restart: unless-stopped init: true ports: - "8000:80/tcp" volumes: - ./dokuwiki/conf:/var/www/html/conf - ./dokuwiki/data:/var/www/html/data
What ports does the image use?
The Dokuwiki image only needs one port. Port 80, the standard Apache HTTP port.
What Volumes are required?
The 2 paths needed for persistant data and configuration are displayed in the table below.
||path for Dokuwiki configuration files|
||path for Dokuwiki data files|
These Volumes are required so all wiki settings and pages are kept whenever the Docker container is restarted.
NOTE: On first run these Volumes are populated with the default files required to get Dokuwiki up and running and ready to begin configuring.
Does this Docker image meet my needs? Well, yes it does, obviously!
Hopefully, somemone else will find this image useful too.
ADDENDUM: Initially, I was using the latest PHP 8.2 image as a base but Dokuwiki doesn't seem to work correctly with PHP 8.2 yet so I dropped it back to the latest PHP 7 and all funny behaviour stopped.
Written by Alan Doyle
May 25, 2023.