Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/dev/sr0 permissions #3

Closed
grantbevis opened this issue Mar 26, 2018 · 6 comments
Closed

/dev/sr0 permissions #3

grantbevis opened this issue Mar 26, 2018 · 6 comments

Comments

@grantbevis
Copy link

grantbevis commented Mar 26, 2018

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 the app user inside the container isn't able to access sr0 from my host.

I have then docker exec'd into the container and done usermod -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

@jlesage
Copy link
Owner

jlesage commented Mar 26, 2018

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.

@grantbevis
Copy link
Author

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?

@jlesage
Copy link
Owner

jlesage commented Mar 26, 2018

Using only the script is sufficient. No need to manually sets SUP_GROUP_IDS (via the Dockerfile or docker run command).

@grantbevis
Copy link
Author

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 :)

@jlesage
Copy link
Owner

jlesage commented Mar 27, 2018

Sure I can have a look.

I would not worry about the error. Seems to occur eith xvfb.

@grantbevis
Copy link
Author

Thanks for the note on the error. Repo is b3vis/docker-dvdisaster

huapox pushed a commit to infrastlabs/fk-docker-baseimage-gui that referenced this issue Oct 19, 2023
huapox pushed a commit to infrastlabs/fk-docker-baseimage-gui that referenced this issue Oct 19, 2023
huapox pushed a commit to infrastlabs/fk-docker-baseimage-gui that referenced this issue Oct 20, 2023
huapox pushed a commit to infrastlabs/fk-docker-baseimage-gui that referenced this issue Oct 22, 2023
tiger/build # @ubt2004
TIGERVNC_VERSION=1.12.0
XSERVER_VERSION=1.20.7

tiger/build back ver, for patch

tiger/build GNUTLS_VERSION=3.6.13 jlesage#3.7.1

vers @ubt

change vers

fix jlesage#3.7.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants