From 72b86ca6ad499a9b43b08167dbf8f00d7b2edc0a Mon Sep 17 00:00:00 2001 From: Domagoj Date: Fri, 15 Aug 2025 13:50:35 +0200 Subject: [PATCH] Add package manager constraint to package.json and Dockerfile Update podman.md docs --- Dockerfile | 2 +- docs/podman.md | 14 +++++++++++--- package.json | 3 ++- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7e8af3699bc..4b186b258f7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ RUN apk add --no-cache git WORKDIR /app # Enable and prepare pnpm -RUN corepack enable && corepack prepare pnpm@10 --activate +RUN corepack enable && corepack prepare pnpm@10.14.0 --activate COPY . . diff --git a/docs/podman.md b/docs/podman.md index 4105c969be1..7f1c2d8a653 100644 --- a/docs/podman.md +++ b/docs/podman.md @@ -7,7 +7,15 @@ ## Steps 1. `podman build -t pokerogue -f Dockerfile .` -2. `podman run --rm -p 8000:8000 -v $(pwd):/app:Z --userns=keep-id -u $(id -u):$(id -g) localhost/pokerogue` -3. Visit `http://localhost:8000/` +2. `podman create --name temp-pokerogue localhost/pokerogue` +3. `podman cp temp-pokerogue:/app/node_modules ./` +4. `podman rm temp-pokerogue` +5. `podman run --rm -p 8000:8000 -v $(pwd):/app:Z --userns=keep-id -u $(id -u):$(id -g) localhost/pokerogue` +6. Visit `http://localhost:8000/` -Note: `podman run` may take a couple of minutes to mount the working directory \ No newline at end of file +Note: + +1. Steps 2,3,4 are required because mounting working directory without installed `node_modules/` locally will be empty, +this way we prevent it by copying them from the container itself to local directory + +2. `podman run` may take a couple of minutes to mount the working directory \ No newline at end of file diff --git a/package.json b/package.json index 29439f7186b..9c0ee8a43cc 100644 --- a/package.json +++ b/package.json @@ -63,5 +63,6 @@ }, "engines": { "node": ">=22.0.0" - } + }, + "packageManager": "pnpm@10.14.0" }