As of this writing, the node images are based on the debian base image [1].
As such, you can just go ahead and modify your Dockerfile to install the compiler.
Something like:
FROM resin/raspberry-pi-node:8
# install gcc 4.8 (dependency of node-rpio)
RUN apt-get update
RUN apt-get -f -y install gcc-4.8
# install node-rpio
ADD package.json .
RUN npm i rpio
# ... the rest of your dockerfile
Thanks for the reply - so nice to get help when you are new to a platform/docker.
I am running my raspberry 3 in local mode, with the docker setup provided by you. It seems to work like a charm, but currently I am waiting a long time for the last step on doing push: removing intermediate container. I will get back when it’s done
Installing gcc-4.8 like above works, but I now get the error: error: uncaughtException: /usr/src/app/node_modules/rpio/build/Release/rpio.node: invalid ELF header.
Now I am trying to use the arm32v7/node:8-jessie docker image, to see if that will work. update
Using the arm32v7/node:8-jessie did not work , I still get the invalid ELF header error.
I think it’s a bit weird that I can’t find more GPIO/Nodejs/Raspberry images?
“invalid ELF header” likely implies the executable in the rpio build dir was compiled for the wrong word length (32 / 64), the wrong instruction set architecture, or the wrong ABI.
Could you post the output from inside your container of “readelf -h /usr/src/app/node_modules/rpio/build/Release/rpio.node” ?