Dockerfile uses npm install but project declares workspace:* deps (pnpm-only) #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
A clean clone of upstream
kind-0/nsecbunkerdat HEAD fails to build with:…on
RUN npm installin the upstreamDockerfile. The build never completes; no Docker Hub image can be produced this way.Root cause
package.jsondeclares"@nostr-dev-kit/ndk": "workspace:*"(and possibly other workspace refs). Theworkspace:protocol is a pnpm feature (also yarn berry); npm has no concept of it. The repo ships apnpm-lock.yaml(nopackage-lock.json), confirming the intended package manager is pnpm.The upstream Dockerfile's
RUN npm installtherefore can't work on any clean clone — it would only succeed in an environment where npm somehow already had the workspace resolution figured out, which isn't possible without monkey-patching.Fix we applied (in
aiolabs/nsecbunkerd)Switch the Dockerfile to pnpm. Patched in
~/dev/local/docker/regtest/nsecbunker/Dockerfile(local build context):(
--no-frozen-lockfileis required for a separate reason — see #2.)Upstream impact
Cannot be using vanilla upstream without local patches. Has been in this state on
kind-0/nsecbunkerdfor at least the last major commits we examined. Likely Pablo's own deploy pipeline uses pnpm directly and the Dockerfile drifted.Acceptance for this issue (in our fork)
kind-0/nsecbunkerd#?.Cross-refs
aiolabs/lnbits#9(aiolabs/lnbits#18).pnpm-lock.yamlis out of date vspackage.json— frozen install fails #2@nostr-dev-kit/ndkdeclared asworkspace:*with no workspace setup #3pingOrDieself-watchdog false-positives → bunker exits every 30s on non-public relays #4pablof7z/nsecbunkerd:latestis arm64-only — fails on amd64 hosts #6