I’ve finally managed to compile the Michael Hart Alpine version in my Raspberry Pi 3. I tried to have this image ready for my article Dockerizing Node 8 on Raspberry Pi but it was not possible. At the end, the key was to give a little more swap memory to the system, as is obvious Raspbian has few resources.
The way to add 512MB of swap memory from your SdCard would be something like this
sudo dd if=/dev/zero of=/tmp/swapfile bs=1M count=512 && \
With this trick, the compilation was a success.
Having said that, I updated my version of Node Alpine for Raspberry Pi 3 kafebob/rpi-alpine-node and you will get Node 8.4.0, Npm 5.3.0 and Yarn 0.27.5 ready to use.
In case you want to compile the image by yourself, you can get a Dockerfile copy here.
And if you trust me, bellow I show you the way to pull a copy and start to use it:
sudo docker run -it --rm kafebob/rpi-alpine-node
If you are interested in the NVM-based version of Node, I have created a new image that offers Node 8.4.0 and Npm 5.3.0 using Node Version Manager, to get and execute this image just
sudo docker run -it --rm kafebob/rpi-alpine-nvm
If you want to compile your own version you can find the Dockerfile in my repository here.
I hope this information will be useful to someone.