Sign inSign up

amcorreia/docker-dokuwiki

By amcorreia

•Updated almost 8 years ago

Dokuwiki Alpine based image

Image
0

319

amcorreia/docker-dokuwiki repository overview

⁠#amcorreia/dokuwiki

Docker Stars Docker Pulls Docker Build Layers Version

⁠DO NOT USE in production, it's using PHP7 built-in web server

Lightweight Docker container image with DokuWiki⁠ and php7 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/docker-dokuwiki
⁠Data persistency

⁠Volumes we are going to use

VolumeUsage
dataAll data that is written by DokuWiki is stored here (see savedir⁠), the changelog is placed here, too
pluginsPlugins⁠ are stored here
confConfiguration⁠ data is stored here
tplTemplate⁠

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/docker-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/docker-dokuwiki

and next time just run

$ docker start wiki

If you're having trouble with timezone, set environment variable to fix

    -e TZ=America/Sao_Paulo

⁠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.

Or you can use this plugin (Advanced Plugin) https://www.dokuwiki.org/plugin:advanced⁠

⁠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/

Tag summary

Content type

Image

Digest

Size

37.1 MB

Last updated

almost 8 years ago

docker pull amcorreia/docker-dokuwiki