Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • That's an excellent suggestion: before I made test_user a member of just the root group on the host-side in the post above, it was actually a member of the gpio group, however there isn't a gpio group inside the Ubuntu Docker container; I guess I need to do some udev rules magic, a la unix.stackexchange.com/questions/42122/…? Commented Jul 5, 2023 at 13:43
  • I think the rules you need are in /etc/udev/rules.d/99-com.rules in Raspberry Pi OS, specifically the SUBSYSTEM=="gpio", GROUP="gpio", MODE="0660" rule. Commented Jul 5, 2023 at 14:40
  • Oh, and you don't need /sys to use libgpiod - in case that is the reason you are importing it into the docker container. Commented Jul 5, 2023 at 14:46
  • As noted in @Rob's answer, you don't need the udev rule - docker is just mounting the host /dev in the container. But leaving the comment for reference for anyone unsure where the group/permissions of the gpiochip are generally set on the host. Commented Jul 7, 2023 at 1:35