This gist demonstrates how to access the Raspberry Pi 5 GPIO pins inside a docker container without the need to run Docker with --privileged
Copy Dockerfile
and gpiod-test.py
onto your host, then run
docker build -t gpiotest . && docker run -it --device /dev/gpiochip4:/dev/gpiochip4 gpiotest