Skip to content

Instantly share code, notes, and snippets.

@cybertramp
Created September 10, 2019 10:26
Show Gist options
  • Select an option

  • Save cybertramp/668398f4c101c95eaf85de95027bd0da to your computer and use it in GitHub Desktop.

Select an option

Save cybertramp/668398f4c101c95eaf85de95027bd0da to your computer and use it in GitHub Desktop.
docker-dokuwiki runnning script
#!/bin/bash
#================
# Script on paran_son@outlook.com
#
# Updated on: 19.09.10
#================
# ref: https://github.com/bitnami/bitnami-docker-dokuwiki
# I'm tested in GCP and now running.
#### Docker service running check
servicename="docker.service"
echo "$servicename is running? => $(sudo systemctl is-active $servicename)"
if [ $(sudo systemctl is-active $servicename) == "inactive" ]; then
echo "$servicename will be restarting..."
sudo systemctl restart $servicename
fi
#### Docker network creation(option)
#docker network create dokuwiki-tier
#### clear before docker
#### (If you have ever run Docker before, command should be delete it.)
sudo docker rm dokuwiki
#### docker run
# My external volume is /data/wiki/dokuwiki
# It's dokuwiki downloaded data file
# You can get [https://download.dokuwiki.org/]
sudo docker run -d -p 80:80 -p 443:443 \
--name dokuwiki \
-e DOKUWIKI_USERNAME="INPUT YOUR ID" \
-e DOKUWIKI_PASSWORD="INPUT YOUR PW" \
-e DOKUWIKI_FULL_NAME="INPUT WRITTER" \
-e DOKUWIKI_EMAIL="paran_son@outlook.com" \
-e DOKUWIKI_WIKI_NAME="WIKINAME" \
--net dokuwiki-tier \
--volume /data/wiki/dokuwiki:/bitnami/dokuwiki \
bitnami/dokuwiki:latest
# Good :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment