Bootstrap pnpm via Corepack and pin packageManager version
Replace the npm-based pnpm bootstrap in the Docker assets stage with Corepack (ships with Node, no npm needed) and pin the pnpm version via package.json's packageManager field for reproducible builds.
This commit is contained in:
+3
-1
@@ -26,7 +26,9 @@ FROM node:22-bookworm-slim AS assets
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package.json pnpm-lock.yaml ./
|
COPY package.json pnpm-lock.yaml ./
|
||||||
RUN npm install -g pnpm && pnpm install --frozen-lockfile --ignore-scripts
|
# Corepack ships with Node and activates the pnpm version pinned in
|
||||||
|
# package.json's "packageManager" field — no npm bootstrap needed.
|
||||||
|
RUN corepack enable && pnpm install --frozen-lockfile --ignore-scripts
|
||||||
COPY . .
|
COPY . .
|
||||||
COPY --from=builder /home/timetracker/app/ts/generated ./ts/generated
|
COPY --from=builder /home/timetracker/app/ts/generated ./ts/generated
|
||||||
RUN pnpm tailwindcss -i ./common/input.css -o ./games/static/base.css \
|
RUN pnpm tailwindcss -i ./common/input.css -o ./games/static/base.css \
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"packageManager": "pnpm@10.33.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tailwindcss/forms": "^0.5.7",
|
"@tailwindcss/forms": "^0.5.7",
|
||||||
"@tailwindcss/typography": "^0.5.13",
|
"@tailwindcss/typography": "^0.5.13",
|
||||||
|
|||||||
Reference in New Issue
Block a user