Good Idea - Doesn't Work: Docker Legacy PiOS with GoPiGo3 install script

In the quest for an easy way to install GoPiGo3 API over the latest OS on the latest Raspberry Pi, the idea to create a Docker image based on the official python:3.7-buster Docker image, adding the pi user and running the GoPiGo3 update_gopigo3.sh installation script.

I was able to get the build to complete without complaining, but attempting to instantiate a GoPiGo3 object requires pigpiod, which complains “machine is not a rasberry pi” so it looks like this idea is a dead end.

I have Docker installed on my PiOS Bookworm Pi5 and just tried:

pi@GoPi5Go:~/GoPi5Go/systests/legacy $ docker run -it --net=host --privileged --rm python:3.7-buster bash
root@GoPi5Go:/# whoami
root
root@GoPi5Go:/# more /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"      <<--- Buster
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@GoPi5Go:/# python --version
Python 3.7.17                                             <--- Python 3.7  (Why did you want 3.7?)
root@GoPi5Go:/# uname -a
Linux GoPi5Go 6.6.31+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.31-1+rpt1 (2024-05-29) aarch64 GNU/Linux
root@GoPi5Go

This is on a 64-bit Bookworm, the Buster OS is running over the Bookworm 64-bit kernel.

Created a “DockerFile” to build upon this image - add a pi user, bring down and run the GoPiGo3 install script on the python:3.7-buster base.

The build succeeds but the GoPiGo3 complains because pigpiod doesn’t like the Pi5:


#29 255.0 GOPIGO3 SOFTWARE INSTALLATION SUCCESSFUL.
#29 DONE 271.1s


pi@GoPi5Go:DOCKER:~/Dexter/GoPiGo3/Software/Python/Examples $ sudo ./Read_Info.py 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Can't connect to pigpio at localhost(8888)

Did you start the pigpio daemon? E.g. sudo pigpiod


...


pi@GoPi5Go:DOCKER:~/Dexter/GoPiGo3/Software/Python/Examples $ sudo pigpiod
2024-08-09 13:01:51 gpioHardwareRevision: unknown rev code (c04170)
2024-08-09 13:01:51 initCheckPermitted: 
+---------------------------------------------------------+
|Sorry, this system does not appear to be a raspberry pi. |
|aborting.                                                |
+---------------------------------------------------------+


Can't initialise pigpio library

All the details:

2 Likes

Did you make sure localhost was listening at 8888?

I’ve run into that a few times and it turns out that it wasn’t listening because of some error buried in a log somewhere.  Or a permissions issue, or a. . . .

Getting ngnix to work for me was very similar.

You can disable that check if I remember correctly.  You can also look for a later version of pigpio that supports the Pi-5.

2 Likes

No way to disable:

pigpio.c:int initInitialize(void):
...

 if (initCheckPermitted() < 0) return PI_INIT_FAILED;

The dev announced “ain’t gonna happen”, and the crying public all turned to the “official Raspberry Pi GPIO library” libgpiod.

2 Likes