0

I'm developing a program for Raspberry Pi in Java which works fine on a Raspi. Now I want to add functionality, that is not directly related to GPIO. And I don't want to carry around the Raspi with my development notebook. My idea:

  • pull the working image from raspi's memory card
  • create a docker container out of that
  • run it in docker
  • see other post for that...works fine
  • start docker container, go into it, start sshd...works
  • use Eclipse and Maven to push jar to container...works

BUT...the same program, that works fine on the hardware-pi, crashes on startup in the docker container with

Caused by: com.pi4j.library.pigpio.PiGpioException: PIGPIO ERROR: PI_INIT_FAILED; pigpio initialisation failed
    at com.pi4j.library.pigpio.impl.PiGpioBase.validateResult(PiGpioBase.java:263) ~[pi4j-library-pigpio.jar:?]
    at com.pi4j.library.pigpio.impl.PiGpioBase.validateResult(PiGpioBase.java:249) ~[pi4j-library-pigpio.jar:?]

Start is with sudo directly in the container. For my development use case, I do not need working Pins from GPIO. My program shall set a pin to hi or low and qemu/docker shall silently ignore that. I know, that this doesn't make sense in a container...but for the functionality to be added working pins are not important.

Is there some chance to get that running? Thank you for your support!

fbstov
  • 1
  • 1

0 Answers0