Skip to content

Commit

Permalink
fix(remix-ui): install correct pnpm version
Browse files Browse the repository at this point in the history
This patch ensures that we still take advantage of the layer caching
that only relies on the `pnpm-lock.yaml` file and not the `package.json`
file (which could change due to added scripts, etc). Previously, there
was an issue with the default `pnpm` version not being compatible with
the `pnpm` version specified by our `package.json`. I now explicitly
install the same version with `corepack` before the `pnpm fetch` step.

Alternatively, I should probably just update the `pnpm` version used by
the project to match what is used in the Node.js 22 Docker image by
default.

Ref: https://pnpm.io/cli/fetch

Fixes: 49e0ac2 ("fix: reckless change for docker build")
  • Loading branch information
nicholaschiang committed Nov 23, 2024
1 parent 9acac12 commit d9da169
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions remix-ui/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# base node image
FROM node:22-bullseye-slim as base
RUN corepack enable

RUN corepack enable pnpm && corepack install -g pnpm@8.10.5

WORKDIR /site

# set for base and all layer that inherit from it
Expand All @@ -17,7 +19,7 @@ ADD pnpm-lock.yaml .
RUN pnpm fetch

ADD package.json .
RUN pnpm install
RUN pnpm install --frozen-lockfile --offline

# build the app
ADD . .
Expand Down

0 comments on commit d9da169

Please sign in to comment.