Add package manager constraint to package.json and Dockerfile

Update podman.md docs
This commit is contained in:
Domagoj 2025-08-15 13:50:35 +02:00
parent 28c535cadc
commit 72b86ca6ad
3 changed files with 14 additions and 5 deletions

View File

@ -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 . .

View File

@ -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
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

View File

@ -63,5 +63,6 @@
},
"engines": {
"node": ">=22.0.0"
}
},
"packageManager": "pnpm@10.14.0"
}