Dockerfile nodejs



I’m trying to create a custom Dockerfile for my nodejs application based of the nodejs base images.
It seems that I’m not able to test it on a local docker installation … is that normal ?

I know that my app is working as a NodeJS application, without the dockerfile, but I would love to get it working with the Dockerfile.

Is it even possible to test this locally ?

Do I have to do something special ?



I did some further investigation… and tried a docker installation on my Beaglebone Black. Tried to use my Dockerfile on that “installation” … and it seems that that’s working …

So it has something to do with my X64 environment … Is there someone who could help me ? Give me some tips where to look at ?

thanks in advance!!


Hey there – the issue is to do with the base layer that’s used in the dockerfile. The layer is compiled for ARM, so it won’t work on your PC. If, however, you replaced it with an equivalent layer that works on x86-64, there’s a good chance it would work.


indeed it is for arm …

but using the qemu … you should be able to run an arm - container on a x64 environment … which I already did … but i can’t seem to get it working with resin’s base images …


I’m assuming you already managed to get qemu-static-arm to run your arm executables in your x86 environment.

Were you using the onbuild tagged images? Those images perform additional actions which you might not want.

My current Dockerfile looks something like this :

FROM resin/armv7hf-node:0.10.38

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY package.json /usr/src/app/
RUN npm install --unsafe-perm --production

COPY . /usr/src/app
CMD "npm" "start" is a cool tool to visualise the layer actions that formed an image 0.10.38 vs 0.10.38-onbuild.

This is able to run on my local docker without issues. Perhaps you could tell us exactly what error you’re getting?