This is a docker image for pnpm, which is flexible to adjust version of node and pnpm.
To use this image, you can use it in two ways, but there will be a little different when using these two methods.
docker run --rm -it -v $(pwd):/app moontai0724/pnpm:latest pnpm install
The image should contains latest pnpm version, but if you want to re-download when startup or use a specific version of pnpm, you can specify the PNPM_VERSION
environment variable.
This image contains an entrypoint script, which could run script when the image startup, that will re-download pnpm when startup.
docker run --rm -it -v $(pwd):/app -e PNPM_VERSION=7.33.6 moontai0724/pnpm:latest pnpm install
FROM moontai0724/pnpm
# your code
Please note that the entrypoint script will be executed after the image built, so you will use the pnpm version that is pre-installed in the image. If you want to use another version of pnpm, please manually run the installation script.
FROM moontai0724/pnpm
RUN sh /run/install_pnpm.sh
# your code
If you want to install a specific version of pnpm, you can set the PNPM_VERSION
environment variable.
FROM moontai0724/pnpm
RUN export PNPM_VERSION=7.33.6
RUN sh /run/install_pnpm.sh
# your code
Name | Default Value | Description |
---|---|---|
PNPM_VERSION | N/A | The version of pnpm to install. Specify latest to download latest version of pnpm. Will skip install if empty. |