Skip to content

Commit

Permalink
build(docker): use pnpm instead of corepack (#34007)
Browse files Browse the repository at this point in the history
  • Loading branch information
viceice authored Feb 3, 2025
1 parent 77a5c15 commit 904bc90
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 4 additions & 4 deletions docs/development/local-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ You need the following dependencies for local development:

- Git `>=2.45.1`
- Node.js `^20.15.1`
- pnpm `^9.0.0` (use corepack)
- pnpm `^9.0.0`
- C++ compiler

We recommend you use the version of Node.js defined in the repository's `.nvmrc` or use [Volta](https://volta.sh/) to manage your tool versions.
Expand All @@ -26,12 +26,12 @@ You can use the following commands on Ubuntu.
curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get update
sudo apt-get install -y git build-essential nodejs
corepack enable
npm install -g pnpm@latest-10
```

#### Nix

To enter a development shell with the necessary packages, run `nix-shell --packages gcc gitFull nodejs` and then `corepack enable`.
To enter a development shell with the necessary packages, run `nix-shell --packages gcc gitFull nodejs` and then `npm install -global pnpm@latest-10`.

#### Windows

Expand All @@ -41,7 +41,7 @@ If you already installed a part, skip the corresponding step.
- Install [Git](https://git-scm.com/downloads). Make sure you've [configured your username and email](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup)
- Install [Node.js LTS](https://nodejs.org/en/download/)
- In an Administrator PowerShell prompt, run `npm install -global npm` and then `npm --debug install --global windows-build-tools`
- Enable corepack with: `corepack enable`
- Install pnpm with: `npm install -global pnpm@latest-10`

You can see what versions you're using like this:

Expand Down
8 changes: 6 additions & 2 deletions tools/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ FROM --platform=$BUILDPLATFORM ghcr.io/renovatebot/base-image:9.38.3@sha256:e4d3
# renovate: datasource=node-version
RUN install-tool node 22.13.1

# corepack is too buggy 😞
# renovate: datasource=npm
RUN install-tool pnpm 9.15.4

WORKDIR /usr/local/renovate

ARG TARGETPLATFORM
Expand Down Expand Up @@ -63,14 +67,14 @@ ENV npm_config_arch=${ARCH} npm_config_platform_arch=${ARCH}

# only fetch deps from lockfile https://pnpm.io/cli/fetch
RUN set -ex; \
corepack pnpm fetch --prod; \
pnpm fetch --prod; \
true

COPY --link . ./

# install npm packages
RUN set -ex; \
corepack pnpm install --prod --offline --ignore-scripts; \
pnpm install --prod --offline --ignore-scripts; \
true

# --------------------------------------
Expand Down

0 comments on commit 904bc90

Please sign in to comment.