Docker non-root access volume for runtime image
I have this
Dockerfile
Something like File.WriteAllText("/home/app/data/file.txt", "lorem ipsum")
get permission denied when the volume is mounted in linux
I've tried many things related to docker. I suspect it's how the dotnet/runtime image is setup might be the issue. But i'm not that advanced.
Ideally, i would like to save the file to /data
instead of /home/app/data
2 Replies
If you run ls -l on ./testdata what are the permissions on it?
You may need to run chmod o+w to give write (w) access to others (o)
Since the app user is not on your system
Not a huge Linux permissions expert though
Yup that was it, i got helped on stackoverflow