From f8eee54f5d5eceddb1909a29d1306536d365bfe0 Mon Sep 17 00:00:00 2001 From: kev Date: Tue, 25 Aug 2015 00:52:58 +0800 Subject: [PATCH] update --- dokuwiki/README.md | 54 +++++++++++++++------------------------------- 1 file changed, 17 insertions(+), 37 deletions(-) diff --git a/dokuwiki/README.md b/dokuwiki/README.md index c29086d..02d21df 100644 --- a/dokuwiki/README.md +++ b/dokuwiki/README.md @@ -1,46 +1,26 @@ -docker-dokuwiki -=============== +dokuwiki +======== -Docker container image with [DokuWiki](https://www.dokuwiki.org/dokuwiki) and apache+php. +![](https://badge.imagelayers.io/vimagick/dokuwiki:latest.svg) -###How to run +[DokuWiki][1] is a simple to use and highly versatile Open Source wiki software that doesn't require a database. -Assume your docker host is localhost and HTTP public port is 8000 (change these values if you need). +## Run -First, run new dokuwiki container: +``` +$ docker run -d -p 8000:80 --restart always --name dokuwiki vimagick/dokuwiki +``` - docker run -d -p 8000:80 --name dokuwiki vimagick/dokuwiki +## Backup -Then setup dokuwiki using installer at URL `http://localhost:8000/install.php` +``` +$ docker run --volumes-from dokuwiki -v `pwd`:/backup alpine tar czf /backup/dw-backup.tgz /var/www/html +``` -###How to make data persistent +## Restore -To make sure data won't be deleted if container is removed, create an empty container named `dokuwiki-data` and attach DokuWiki container's volumes to it. Volumes won't be deleted if at least one container owns them. +``` +$ docker run --volumes-from dokuwiki -v `pwd`:/backup alpine tar xzf /backup/dw-backup.tgz +``` - # create data container - docker run --volumes-from dokuwiki --name dokuwiki-data busybox - - # now you can safely delete dokuwiki container - docker stop dokuwiki && docker rm dokuwiki - - # to restore dokuwiki, create new dokuwiki container and attach dokuwiki-data volume to it - docker run -d -p 8000:80 --volumes-from dokuwiki-data --name dokuwiki vimagick/dokuwiki - -###How to backup data - - # create dokuwiki-backup.tar.gz archive in current directory using temporaty container - docker run --rm --volumes-from dokuwiki -v $(pwd):/backup ubuntu tar zcvf /backup/dokuwiki-backup.tar.gz /var/www - -###How to restore from backup - - #create new dokuwiki container, but don't start it yet - docker create -p 8000:80 --name dokuwiki vimagick/dokuwiki - - # create data container for persistency (optional) - docker run --volumes-from dokuwiki --name dokuwiki-data busybox - - # restore from backup using temporary container - docker run --rm --volumes-from dokuwiki -w / -v $(pwd):/backup ubuntu tar xzvf /backup/dokuwiki-backup.tar.gz - - # start dokuwiki - docker start dokuwiki +[1]: https://www.dokuwiki.org/dokuwiki