From 85c10f908bc699aeca3ecbc81bf1c199ecd47025 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Mon, 13 Jul 2026 20:26:33 +0000 Subject: [PATCH] fix: delete npm allow-scripts restriction before install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The node:24-trixie base image has npm configured with a restricted allowScripts list, preventing opencode-ai's postinstall from running. Delete the allow-scripts config before installing packages to restore legacy npm behavior where all scripts are allowed. Fixes: opencode-ai postinstall script was not run → opencode --version fails --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index f498dd0..417022f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,7 @@ RUN apt-get update && \ userdel -r node; \ groupadd -g 1000 opencode; \ useradd -m -u 1000 -g 1000 -s /usr/bin/bash opencode; \ + npm config delete allow-scripts && \ 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 cache clean --force && \