fix: run opencode-ai postinstall script after npm install
The node base image has npm configured with ignore-scripts or the new opencode-ai versions require explicit postinstall execution. Running the postinstall manually after npm install ensures opencode --version works regardless of npm configuration.
This commit is contained in:
@@ -13,6 +13,7 @@ RUN apt-get update && \
|
||||
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 && \
|
||||
cd /usr/local/lib/node_modules/opencode-ai && node postinstall.mjs && \
|
||||
npm cache clean --force && \
|
||||
chown -R 1000:1000 /usr/local/lib/node_modules/n2-soul/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user