Actually Raspberry pi 4, but there doesn’t seem to be a tag for that.
I’m trying to build an image with both python and node. Here’s a simple
FROM balenalib/%%BALENA_MACHINE_NAME%%-ubuntu-python:3.7-build as build RUN curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - RUN apt-get install nodejs RUN echo "Hello" COPY idle.sh idle.sh CMD ["/bin/bash","-c",". idle.sh"]
If I skip lines 2 and 3, and execute them after logging into the container from the web terminal, they run fine and node 12 installs. However, the build fails when running it using
[Debug] Prepared tasks; building... [Build] main Step 1/6 : FROM balenalib/raspberrypi4-64-ubuntu-python:3.7-build as build [Build] main ---> 9267040b7ec9 [Build] main Step 2/6 : RUN curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - [Build] main ---> Using cache [Build] main ---> b82bf1d13038 [Build] main Step 3/6 : RUN apt-get install nodejs [Build] main ---> Running in 2e62ade8f100 [Build] main Reading package lists... [Build] main Building dependency tree... [Build] main Reading state information... [Build] main E: Unable to locate package nodejs [Build] Built 1 service in 0:01 [Error] Build failed The command '/bin/sh -c apt-get install nodejs' returned a non-zero code: 100 Error: The command '/bin/sh -c apt-get install nodejs' returned a non-zero code: 100 at Stream.<anonymous> (/usr/local/lib/node_modules/balena-cli/node_modules/resin-docker-build/build/builder.js:178:23)
What am I missing?