Docker Community Forums

Share and learn in the Docker community.

libnode-dev installation within docker container

I’m trying to run a node.js application.

I can run it without problems directly on my raspbian buster.

Within a docker container running on the same raspberry pi, I have no such luck.


FROM balenalib/raspberry-pi2-debian-node:10-stretch-run

RUN sudo apt-get update
RUN sudo apt-get -y install g++ python make git

WORKDIR /usr/src/app

COPY package.json package.json

RUN JOBS=MAX npm install --production
COPY . ./

CMD ["npm", "start"]

But when I run the same node.js code within a docker container, I’m getting a error.

pi@raspberrypi:~/rpi-lora-sensorified/data $ docker logs rpi-lora-sensorified_data_1

> resin-websocket@1.0.1 start /usr/src/app
> node index.js

        throw e;

Error: cannot open shared object file: No such file or directory

I’ve tried installing libnode-dev (which I’ve concluded provides this library) within the container, but I’m getting a

E: Unable to locate package libnode-dev

And yes, I’ve rebuilt the container without cache but still cannot locate that package.

Any (like really even some pointers would help) idea where do I continue to look further?