/docker-dokuwiki

Alpine DokuWiki Docker Container

Primary LanguageShellMIT LicenseMIT

Alpine DokuWiki Docker Container

GitHub Tag Docker Stars Docker Pulls Docker Automated Build Docker License

Run:

Run DokuWiki container:

docker run \
    --publish 80:80 \
    --name dokuwiki \
    --restart always \
    --detach \
    bambucha/dokuwiki

Setup DokuWiki using installer.

Data container

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 \
    --publish 80:80 \
    --volumes-from dokuwiki-data \
    --name dokuwiki \
    --restart always \
    --detach \
    bambucha/dokuwiki

Backup

Create dokuwiki-backup.tar.gz archive in current directory using temporaty container:

docker run \
    --rm \
    --volumes-from dokuwiki-data \
    --volume $(pwd):/backups \
    alpine:3.4 \
    tar zcvf /backups/dokuwiki-backup.tar.gz /dokuwiki

Restore

Run DokuWiki container:

docker run \
    --publish 80:80 \
    --name dokuwiki \
    --restart always \
    --detach \
    bambucha/dokuwiki

Create data container:

docker run --volumes-from dokuwiki --name dokuwiki-data busybox

Stop dokuwiki:

docker stop dokuwiki

Restore from backup using temporary container:

docker run \
    --rm \
    --volumes-from dokuwiki \
    -w / \
    -v $(pwd):/backup \
    alpine:3.4 \
    tar xzvf /backup/dokuwiki-backup.tar.gz

Start dokuwiki:

docker start dokuwiki

Build:

git clone https://github.com/bambocher/docker-dokuwiki
cd docker-dokuwiki
docker build --tag bambucha/dokuwiki .

License

The MIT License