Files
opencode/Dockerfile
T
Hermes Agent bc7d0580ac
PR Checks / hadolint (pull_request) Successful in 7s
PR Checks / build-test (pull_request) Failing after 1m3s
fix: force npm postinstall scripts with --ignore-scripts=false
The node base image has npm configured with ignore-scripts, preventing
opencode-ai's postinstall from running. Explicitly pass --ignore-scripts=false
to ensure the postinstall executes, rather than running it manually.
2026-07-13 20:30:42 +00:00

28 lines
844 B
Docker

FROM node:24-trixie
ENV NPM_CONFIG_UPDATE_NOTIFIER=false \
NPM_CONFIG_LOGLEVEL=warn \
NODE_ENV=production
RUN apt-get update && \
apt-get upgrade -y --no-install-recommends ca-certificates && \
rm -rf /var/lib/apt/lists/* && \
set -eux; \
userdel -r node; \
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 --ignore-scripts=false 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/
COPY --chmod=755 opencode-attach /usr/local/bin/opencode-attach
COPY --from=registry.k8s.io/kubectl:v1.36.2 /bin/kubectl /usr/local/bin/kubectl
USER opencode
WORKDIR /home/opencode
RUN opencode --version
ENTRYPOINT ["opencode"]