Closed grantbevis closed 2 years ago
You need to detect at runtime (via an init script) the group of the device. This group will become a supplementary group of app
user. This is done by setting the SUP_GROUP_IDS
environment variable.
You can look at https://github.com/jlesage/docker-handbrake/blob/master/rootfs/etc/cont-init.d/95-check-optical-drive.sh for an example.
Weird, so I added SUP_GROUP_IDS=24
for cdrom
group and it instantly works, is this untidy to do? Adding the above mentioned 95-check-optical-drive.sh
will automatically add the app user to the group right so I don't need to specify SUP_GROUP_IDS=24
or do I need both?
Using only the script is sufficient. No need to manually sets SUP_GROUP_IDS
(via the Dockerfile
or docker run
command).
Got it working now thanks! Once I get it up on here would you mind casting your eyes over it to see if there's anything I could improve?
One last question, the final output on stdout I get from my app is this;
Xlib: extension "RANDR" missing on display ":0".
Is this something to worry about as the app looks fine and works fine too :)
Sure I can have a look.
I would not worry about the error. Seems to occur eith xvfb.
Thanks for the note on the error. Repo is b3vis/docker-dvdisaster
Hi,
I'm trying to correct an issue I've got using this image as a base for a piece of software called dvdisaster. I've managed to get all the build working but I'm struggling with the permissions to /dev/sr0. On the docker host my user with id 1000 is a member of the cdrom group which has
rw
on /dev/sr0 on my host but theapp
user inside the container isn't able to access sr0 from my host.I have then
docker exec
'd into the container and doneusermod -aG cdrom app
and reloaded the app and it's then able to access /dev/sr0. I've tried adding the usermod to my Dockerfile but I think this user is made on container start.Any tips?
Thanks, b3vis
P.S I tried to look through your MakeMKV container to see how you've solved this on that image but was unable to see anything obvious