Alan Doyle

   New Dokuwiki Docker Image

featured image

Why a new Docker Dokuwiki image?

Simple really. I couldn’t find a simple, easy to configure Dokuwiki Docker image.

I tried the image and the Bitnami image but neither felt particularly right and lacked the additional features I wanted.

Desired features

Initial “success”…

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 \

Or via Docker compose:

version: "3"

   image: alandoyle/dokuwiki:latest
   container_name: dokuwiki
   restart: unless-stopped
   init: true
     - "8000:80/tcp"
     - ./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.

Port Description
80/tcp HTTP

What Volumes are required?

The 2 paths needed for persistant data and configuration are displayed in the table below.

Path Description
/var/www/html/conf path for Dokuwiki configuration files
/var/www/html/data 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.

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.

Alan Doyle