1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-16 11:37:34 +02:00
dockerfiles/dokuwiki/README.md

47 lines
1.8 KiB
Markdown
Raw Normal View History

2014-12-17 09:34:20 +02:00
docker-dokuwiki
===============
2015-05-19 12:42:59 +02:00
Docker container image with [DokuWiki](https://www.dokuwiki.org/dokuwiki) and apache+php.
2014-12-17 09:34:20 +02:00
###How to run
Assume your docker host is localhost and HTTP public port is 8000 (change these values if you need).
First, run new dokuwiki container:
2015-05-19 12:42:59 +02:00
docker run -d -p 8000:80 --name dokuwiki vimagick/dokuwiki
2014-12-17 09:34:20 +02:00
Then setup dokuwiki using installer at URL `http://localhost:8000/install.php`
###How to make data persistent
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.
# 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
2015-05-19 12:42:59 +02:00
docker run -d -p 8000:80 --volumes-from dokuwiki-data --name dokuwiki vimagick/dokuwiki
2014-12-17 09:34:20 +02:00
###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
2015-05-19 12:42:59 +02:00
docker create -p 8000:80 --name dokuwiki vimagick/dokuwiki
2014-12-17 09:34:20 +02:00
# 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