If it meets your technical and non-technical needs, using the prebuilt node image is probably simpler and easier to update, and I'd generally recomment using it.
The node image already includes npm; you do not have to apk add it. Moreover, the Dockerfile doesn't use apk to install Node, but instead installs it either from a tar file or from source. So the apk add npm call winds up installing an entire second copy of Node that you don't need; that's probably the largest difference in the two image sizes.
The base image you start from hugely affects your final image size - assuming you are adding the same stuff to each base image. In your case, you are comparing a base alpine image (5.5mb) to a base node image (174mb). The base alpine image will have very little stuff in it while the node image - while based on alpine - has at least got node in it but presumably lots of extra stuff too. Whether you do or do not need that extra stuff is not for me to say.
You can examine the Dockerfile used to build any of these public images if you wish to see exactly what was added. You can also use tools like dive to examine a local image layers.
The complexity of writing an efficient NodeJS Docker image
Lightweight and Performance Dockerfile for Node.js
Choosing the best Node.js Docker image | Snyk
Newbie in Docker. Getting "Error: Cannot find module 'express'"
From the sound of the error, it sounds like Express isn't getting installed when the container is stood up. Have you installed nodejs on your windows box? If so you should be able to run npm commands locally.
When I build my docker images for NodeJS I use the below dockerfile. But I also already have a package.json file. This gets created when you run npm install commands. This is what has worked for me in the past. I've never tried building the container on a system without Node installed.
Pasting my dockerfile for reference.
DockerFile
From node:14
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 3000
CMD ["node", "app.js"]
Also if you go this route you will want to create a .dockerignore file so that the node_modules folder doesn't get copied over to your container.
.dockerignorefile
node_modules
npm-debug.log
Feel free to ask any questions and I will try to help.
More on reddit.com