Docker-compose installation, GPIO on Raspi5
Has anyone had a successful docker compose installation with signal k? I'm trans migrating from a Raspberry Pi 4 with a direct install to a Raspberry Pi 5 and docker. I've gotten the serial connection to come through for NMEA, but I can't seem to get the same success for my gpio SeaTalk. I can see the SeaTalk using the debug python script though, outside the container, so I know the GPIO is working as expected.
10 Replies
I think I may have found the issue:
I think I may have found the issue; in the docker for signalk it seems like python might not be aliased to python3.


I'm also rather inexperienced at docker, so I may be misinterpreting.
Docker-compose working fine with SK.
Map /dev from host to docker to access local ports.
What version of SK docker are you using or your own image?
Official SK docker images have both python2 and python3 installed.
Thanks for checking in.
I dug in and got past the issue. I made a comment on https://github.com/SignalK/signalk-server/issues/1703 which I see you're on. In it I share my dockerfile and docker-compose.
I'm happy to chat there or here, caveat I am very new to using docker, so I might be just way off in the weeds on some things.
I am using the image:
signalk/signalk-server:latest
It seemed like the issue for me wasn't that python was missing, just not aliased to python
from python3
Is there an official docker-compose file I should be using? I understand that everyone's configuration is different, but I didn't really have a starting point so I did my best. I ended up using an additional dockerfile because of the above issue and the issues that followed it.Your compose file is OK. Just small fine tuning
Devices can be removed
You can login to running container with root to install missing packages too.
docker exec -it -u root <container> bash
Maybe including dev is the reason I was struggling with GPIO. It seemed like it was failing when it tried to access gpiochps that weren't gpipchip0, I'll try removing dev (and my hack) and seeing what happens.
It's weird that the packages are missing, no? Does the bare container work for you? Installing the packages inside the running container is fine, but wouldn't I have to do that every time it boots up?
Also mount /home/node/.signalk from the host too
Untill you update docker image all packages are in contaner and safe. Restart, start and stop are safe operations. Down will remove container content and up will take fresh image.
But volume mounts are way to go here.
Actually, I don't mount /dev. I don't know where you see that I do.
So that wasn't it.
My host does mount .signalk:
- ./signalk:/home/node/.signalk
oh you're proposing that I do mount /dev. I get it now. that's worth checking out.
Is it feasible for the docs to post a working docker-compose file?
Thank you for this advice. My compose ran into some issue that I couldn't diagnose and I changed to just using the volumes; so far so good.
It still seems to need the device-tree workaround though, so I think there might be some bug in the seatalk script for pi5