Skip to content

akccakcctw/docker-pnpm

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

docker-pnpm

A Node.js + PNPM docker image

Overview

This Docker image is based on node:14.18.1-buster and includes PNPM installed globally via npm.

Important Update for Node.js v16.13 and Above

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.

Using Corepack with Newer Node.js Versions

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.

Enabling Corepack

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.

For Users of Node.js v14.18.1

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

For GitHub Action Usage

uses: akccakcctw/docker-pnpm