I’m trying to upload a Node-RED application to my RaspberryPi4 running BalenaOs but i keep getting the same errors which all are about the RUN command in my dockerfile.
Specifically, the application i am trying to upload is this one and my dockerfile looks like this:
# Build step ### FROM balenalib/%%BALENA_MACHINE_NAME%%-debian-node:12-stretch-build as build RUN JOBS=MAX npm install -g --production --unsafe-perm \ node-red \ node-red-admin \ node-red-contrib-balena ### # Runtime image ### FROM balenalib/%%BALENA_MACHINE_NAME%%-debian-node:12-stretch-run RUN apt-get update && apt-get install -yq --no-install-recommends \ rpi.gpio \ python-dev \ python-rpi.gpio \ && apt-get clean && rm -rf /var/lib/apt/lists/* # Defines our working directory in container WORKDIR /usr/src/app # Copy over the files created in the previous step, including lib/, bin/ COPY --from=build /usr/local/bin /usr/local/bin COPY --from=build /usr/local/lib/node_modules /usr/local/lib/node_modules # This will copy all files in our root to the working directory in the container COPY ./app ./ # server.js will run when container starts up on the device CMD ["bash", "/usr/src/app/start.sh"]
The error messages i get are the following ones:
In case i remove the whole RUN section from the dockerfile then the code is being successfully uploaded to my raspberry and via the public url on the balena cloud i can access the Node-red editor and build my flows, though i’m missing the Raspberry_PI nodes and thus, i can’t use the raspberry GPIO’s in my flows.
Since i am fairly new to the whole balena/container scheme, it would be really appreciated if someone could support me with these errors. What is it i am missing here?
Thanks in advance,