Closed Georacer closed 1 year ago
Upon further googling, I'm pretty sure my situations is similar to this: https://github.com/docker/desktop-linux/issues/31 I've installed Docker Desktop in my machine, even though I still use the command line to summon the compose scripts.
Your image (and many others) read the desired user and group ID as an environment variable and create a new container user based on that.
But docker remaps that UID onto 100999 and the files belonging to the root
of the container actually have my user's UID.
Which totally breaks how the image is set up to work. I'm not sure how this could be fixed, because a lot of functionality in the container is not meant to be executed as root
.
Based on the above information, I think an approach would be to:
chmod -R g+w
the entire volume path, in case my host user wants to edit the files.I my existing plugins still don't load after doing the above, but I think this is due to logic of your image, which replaces some folders with the dokuwiki installation upon building.
I have now opted for a different approach: I create a named volume and mount that into the container. When I want to back up the data, I tar the whole container file tree.
I can then restore it with something like: docker run --rm -v dokuwiki:/data -v $(pwd):/backup ubuntu bash -c "cd /data && tar --same-owner -xvpf /backup/backup.tar --strip 1
I consider this closed by now.
Behaviour
Steps to reproduce this issue
I already have an existing installation of dokuwiki, local on my host. I want to use the same files to mount them on the container and serve them from there. These files are owned by my personal user with UID/GID=1000
docker-compose.yml
file to mount the volume:PUID
andPGID=1000
in.env
.docker compose up -d --build
Expected behaviour
Actual behaviour
Any pointers, especially in the correct volume mount incantation? Thanks in advance!
Configuration
Docker version (type
docker --version
) : Docker version 20.10.17, build 100c701Docker compose version if applicable (type
docker-compose --version
) : N/A, now usingdocker compose
instead ofdocker-compose
Platform (Debian 9, Ubuntu 18.04, ...) : Ubuntu 22.04
System info (type
uname -a
) : Linux george-ThinkPad-E14-Gen-2 5.15.0-46-generic #49~20.04.1-Ubuntu SMP Thu Aug 4 19:15:44 UTC 2022 x86_64 x86_64 x86_64 GNU/LinuxInclude all necessary configuration files :
docker-compose.yml
,.env
, ...Docker info
Logs