This is a simple node docker image that already has the latest npm baked in as very recent version of node have had some vulnerabilities when it comes to packages like ip
an tar
. These images are simply intended to save the step of having to install npm each time a container image is built.
This will build a matrix of node images with recent in-use node versions.
The current matrix is:
- node
18.20.2- 18.20.3
20.12.2- 20.13.1
- 20.14.0
- 20.15.1
- 20.18.0
- alpine
3.183.19- 3.20
- npm
10.5.210.6.0- 10.7.0
- 10.8.2
- 10.9.0
This image is built for both linux/amd64 and linux/arm64 (Mac/AWS Graviton)
You may need to log in to ghcr.io to access/pull images. Try docker pull ghcr.io/tjsr/node_patched_npm:20.18.0-alpine3.20-npm10.9.0
or even just
docker pull ghcr.io/tjsr/node_patched_npm:latest
You can use this image as a builder to build an even smaller image that doesn't have npm at all, after building the base image. We can take that even further by using a bundler to further bundle anything included from node_modules in to a single package. See Smaller images without yarn/npm.
This image now has notifications for funding and updates disabled.