Answer the question
In order to leave comments, you need to log in
How to convince docker to create directories with correct permissions?
We have such a tool tyrrrz/discordchatexporter (but I think it doesn't depend on the tool at all, because the problem arises at a different level)... The tool is engaged in exporting the discord channel to HTML/JSON, etc.
It doesn't really matter what she does, because the problem, apparently, is again on the docker side.
So, what's the catch:
I launch the tool like this:
[email protected]:~$ docker run --rm --user 1000:1000 -v /home/arris/out/:/app/out/ tyrrrz/discordchatexporter:latest export <параметры>
[email protected]:~$ ls -la /home/arris/out/
total 8
drwxr-xr-x 2 root root 4096 Feb 6 21:46 .
drwxr-xr-x 9 arris arris 4096 Feb 6 21:46 ..
[email protected]:~$ id arris
uid=1000(arris) gid=1000(arris) groups=1000(arris), ...
Answer the question
In order to leave comments, you need to log in
1. Use volume
2. Either make sure that the directory exists: mkdir -p <directory> && docker ...
3. Or assign the correct owner of the directory:
mkdir -p <directory> && chown 1000:1000 <directory> && docker ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question