create a docker volume :
for data persistency container needs one volume on the docker host ,which will be mapped to /config folder within the container. create the volume by :
docker volume create dokuwiki
creating the container
docker create \
--name=dokuwiki \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=America/New_York \
-e APP_URL=[YOURURL] `#optional` \
-p 8081:80 \
-v dokuwiki:/config \
--restart unless-stopped \
linuxserver/dokuwiki
variable explenation:
-e PUID : set process userid to 1000 to help avoid permission issues
-e PGID : Sets Process Group ID to 1000 to help avoid permission issues.
-e TZ : time zone (with this format: America/Newyork)
run the container :
docker start <containerId>
if you followed the above configuration then you're done go to http://localhost:8081/install.php for admin config
but if you want to update the already running container :
docker update --restart unless-stopped container_id
# verify the changes you made :
docker inspect container_id
and search for RestartPolicy ,this is what you will be searching for :
"RestartPolicy": {
"Name": "unless-stopped",
you are done !
go to this URL :http://SERVER-IP:8081/install.php for admin configuration .
this might also be helpful:
https://codeopolis.com/posts/how-to-install-dokuwiki-on-docker/
Top comments (0)