HyperionNG Docker - SPI permission denied

  • Hello everyone, I have now managed to get Hyperion running in a Docker container on my Pi5.

    However, I still have one last problem, which I can't solve even after days.


    I get the following error with the LED control:

    LEDDEVICE : <ERROR> Device disabled, device 'apa102' signals error: 'Failed to open device (/dev/spidev10.0). Error message: Permission denied'.



    Actually I have released all devices in the container. The USB Grabber, however, works. Shouldn't the rights for all devices be the same?



    Attached is the Dockerfile:


    FROM debian:bullseye


    RUN export DEBIAN_FRONTEND=noninteractive && \

    apt-get update && \

    apt-get install -y wget gpg sudo && \

    wget -qO /tmp/hyperion.pub.key https://apt.hyperion-project.org/hyperion.pub.key && \

    gpg --dearmor -o - /tmp/hyperion.pub.key > /usr/share/keyrings/hyperion.pub.gpg && \

    echo "deb [signed-by=/usr/share/keyrings/hyperion.pub.gpg] https://apt.hyperion-project.org/ bullseye main" > /etc/apt/sources.list.d/hyperion.list && \

    wget -qO /tmp/hyperion.nightly.pub.key https://nightly.apt.hyperion-project.org/hyperion.pub.key && \

    gpg --dearmor -o - /tmp/hyperion.pub.key > /usr/share/keyrings/hyperion.nightly.pub.gpg && \

    echo "deb [signed-by=/usr/share/keyrings/hyperion.nightly.pub.gpg] https://nightly.apt.hyperion-project.org/ bullseye main" > /etc/apt/sources.list.d/hyperion.nightly.list.disabled && \

    apt-get update && \

    apt-get install -y hyperion && \

    apt-get -y --purge autoremove gpg && \

    apt-get clean



    # Flatbuffers Server port

    EXPOSE 19400


    # JSON-RPC Server Port

    EXPOSE 19444


    # Protocol Buffers Server port

    EXPOSE 19445


    # Boblight Server port

    EXPOSE 19333


    # Philips Hue Entertainment mode (UDP)

    EXPOSE 2100


    # HTTP and HTTPS Web UI default ports

    EXPOSE 8090

    EXPOSE 8092


    ENV UID=1000

    ENV GID=1000


    RUN groupadd -f hyperion

    RUN useradd -r -s /bin/bash -g hyperion hyperion


    RUN echo "#!/bin/bash" > /start.sh

    RUN echo "groupmod -g \$2 hyperion" >> /start.sh

    RUN echo "usermod -u \$1 hyperion" >> /start.sh

    RUN echo "chown -R hyperion:hyperion /config" >> /start.sh

    RUN echo "sudo -u hyperion /usr/bin/hyperiond -v --service -u /config" >> /start.sh


    RUN chmod 777 /start.sh


    VOLUME /config


    CMD [ "bash", "-c", "/start.sh ${UID} ${GID}" ]


    And the Docker Compose File:


    version: '3.3'


    services:

    hyperionng:

    user: "root"

    image: hyperionng:latest

    container_name: hyperionng

    volumes:

    - hyperionng-config:/config

    - /dev/video0:/dev/video0


    ports:

    - "19400:19400"

    - "19444:19444"

    - "19445:19445"

    - "8090:8090"

    - "8092:8092"

    - "2100:2100/udp"

    devices:


    - /dev/ttyACM0

    - /dev/video0

    - /dev/spidev0.0

    - /dev/spidev1.0

    - /dev/spidev10.0


    privileged: true

    restart: unless-stopped


    volumes:

    hyperionng-config:


    Has anyone had the same problem and been able to solve it? I am grateful for any help.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!