fix: pass --allow-scripts to npm install for blocked postinstall
The node:24-trixie base image has npm configured with a restricted allowScripts list, preventing opencode-ai's postinstall from running. Pass --allow-scripts=opencode-ai,better-sqlite3 to npm install -g to explicitly allow these packages to run their install scripts. This is the npm-recommended fix as shown in the npm warning message.
This commit is contained in:
+1
-1
@@ -12,7 +12,7 @@ RUN apt-get update && \
|
||||
groupadd -g 1000 opencode; \
|
||||
useradd -m -u 1000 -g 1000 -s /usr/bin/bash opencode; \
|
||||
npm update -g --no-fund --no-audit && \
|
||||
npm install -g --no-fund --no-audit opencode-ai@1.17.13 n2-soul@9.0.9 && \
|
||||
npm install -g --no-fund --no-audit --allow-scripts=opencode-ai,better-sqlite3 opencode-ai@1.17.13 n2-soul@9.0.9 && \
|
||||
npm cache clean --force && \
|
||||
chown -R 1000:1000 /usr/local/lib/node_modules/n2-soul/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user