Setting Up Node.js on an Alpine Image with a Multi-Stage Build
ToC
When setting up Node.js on a PHP Alpine base image,
you can install it with apk add nodejs,
but you can also achieve it by copying the files needed to run Node from the Node Alpine image using a multi-stage build, which keeps the configuration simple.
1 | FROM node:16.15.1-alpine AS node |
That’s all.
I hope this is helpful.
Setting Up Node.js on an Alpine Image with a Multi-Stage Build
https://kenzo0107.github.io/en/2022/08/24/setup-nodejs-on-alpine/