A Node.js + PNPM docker image
This Docker image is based on node:14.18.1-buster
and includes PNPM installed globally via npm.
Starting with Node.js v16.13, the Node.js releases come with an experimental feature called Corepack that is intended to manage package managers such as PNPM, Yarn, and npm.
For users of Node.js v16.13 and later, it is no longer necessary to use a Docker image with a globally installed package manager. Instead, you can manage package managers directly through Corepack, which is included in these versions of Node.js. See https://pnpm.io/installation#using-corepack for more information.
To enable Corepack and start using PNPM, you can run the following command in your Dockerfile:
FROM node:16.13-buster
RUN corepack enable pnpm
This setup ensures that PNPM is ready to use with Corepack, avoiding the need for manual global installation.
If you are using Node.js v14.18.1, as specified in this Docker image, continue with the setup in this image which includes PNPM installed globally.
FROM akccakcctw/docker-pnpm
uses: akccakcctw/docker-pnpm