I am new to docker and I was trying to deploy the software (https://github.com/HumanSignal/label-studio) to a debian VM. I followed the instructions here:
https://hub.docker.com/r/heartexlabs/label-studio#run-with-docker-compose
but it seems like I am getting a permission error after executing:
docker run -it -p 8080:8080 -v `pwd`/mydata:/label-studio/data heartexlabs/label-studio:latest
The error log is on this screenshot:
My question is: Is it some docker issue (me not setting permissions to some path) or something else?
I tried executing with a root user and thus I expect the permissions to be no problem.
2
Answers
I got the same thing. Looks like a known issue:
https://github.com/HumanSignal/label-studio/issues/3595
They point to this:
https://labelstud.io/guide/install.html#PermissionError-Errno-13-Permission-denied-label-studio-data-media
Apparently the latest version requires root.
Also, just opening up the perms on the folder works, but isn’t secure.
You’re facing a permissions issue due to the user inside the container not having the right access to the mounted volume. Instead of running as root, follow these steps:
Change ownership of your local mydata directory to match the user ID (e.g., 1001) inside the container:
Run the container:
This way, the user inside the container has correct permissions without needing elevated privileges.
For further reference please read best practice suggestions in What is the (best) way to manage permissions for Docker shared volumes?