Public | Automated Build

Last pushed: 3 months ago
Short Description
Dokuwiki Alpine based image
Full Description

#amcorreia/dokuwiki





Lightweight Docker container image with DokuWiki and lighttpd based on Alpine Linux.

How to run

Assume your docker host is localhost and HTTP public port is 80 (change these values if you need).

Without data persistency

Just run:

$ docker run -d -p 80:80 --name wiki amcorreia/dokuwiki

Data persistency

Volumes we are going to use

Volume Usage
data All data that is written by DokuWiki is stored here (see savedir), the changelog is placed here, too
plugins Plugins are stored here
conf Configuration data is stored here
tpl Template

Create all volumes

$ docker volume create dokuwiki-data
$ docker volume create dokuwiki-plugins
$ docker volume create dokuwiki-conf
$ docker volume create dokuwiki-tpl

Run container with all volumes set up

$ docker run --rm -it -p 80:80 --volume dokuwiki-data:/dokuwiki/data --volume dokuwiki-plugins:/dokuwiki/lib/plugins --volume dokuwiki-conf:/dokuwiki/conf --volume dokuwiki-tpl:/dokuwiki/lib/tpl --name wiki  amcorreia/dokuwiki

or you can use

$ docker run  -it -p 80:80 --volume dokuwiki-data:/dokuwiki/data --volume dokuwiki-plugins:/dokuwiki/lib/plugins --volume dokuwiki-conf:/dokuwiki/conf --volume dokuwiki-tpl:/dokuwiki/lib/tpl --name wiki  amcorreia/dokuwiki

and next time just run

$ docker start wiki

Backup

I like the idea of using volume because this makes more easy to know which volume belongs to wich container, and
this way I can mount this volume local, and read file normally. To do this.

Requirements

Install bindfs

# apt-get install bindfs

Now edit /etc/fstab (this is how i'm using)

# grep docker /etc/fstab
/var/lib/docker/volumes/dokuwiki-data/_data/    /home/amcorreia/Documentos/WikiPages/data    fuse.bindfs map=100/1000:@101/@1000,auto 0 0
/var/lib/docker/volumes/dokuwiki-plugins/_data/ /home/amcorreia/Documentos/WikiPages/plugins fuse.bindfs map=100/1000:@101/@1000,auto 0 0
/var/lib/docker/volumes/dokuwiki-conf/_data/    /home/amcorreia/Documentos/WikiPages/conf    fuse.bindfs map=100/1000:@101/@1000,auto 0 0
/var/lib/docker/volumes/dokuwiki-tpl/_data/     /home/amcorreia/Documentos/WikiPages/tpl     fuse.bindfs map=100/1000:@101/@1000,auto 0 0

This will map systemd-timesync (100) with my user id (1000) and same for group.Now will be able to edit file directly
in folder ~/Documentos/WikiPage/

Docker Pull Command
Owner
amcorreia
Source Repository

Comments (0)