New to Balena: Docker + Nodejs + GPIO example

raspberrypi3
docker

#1

Hi everyone.

I am trying to get started with Balena. The application I’m converting is a Node.js, and uses GPIO’s on the raspberry pi 3.

Do you know an example Docker file where this works?

I’m currently trying to use the resin/raspberry-pi-node:10 as base image, but I’m running into GCC-4.8 missing dependencies, and a weird invalid ELF header error?

Thanks for the help.


#2

Hi @alexb

There should be no problem in using nodejs and GPIO from containers. You can see this document https://www.balena.io/docs/learn/develop/hardware/gpio/

I advise you to use the new balenalib container images which contain various improvements instead of the old resin containers.

Here is a blogpost about the new images: https://www.balena.io/blog/new-year-new-balena-base-images/.

Regards!


#3

Thanks for the reply @spanceac, In the end the error was not related to GPIO/Nodejs/Docker, but an issue with how local development pushed the node_modules (despite being ignored in the dockerignore file)