Files
opencode/Dockerfile
renovate 1a3980f51e
renovate/stability-days Updates have met minimum release age requirement
PR Checks / hadolint (pull_request) Successful in 6s
PR Checks / build-test (pull_request) Successful in 1m20s
chore(deps): update dependency opencode-ai to v1.17.20
2026-07-16 22:05:41 +00:00

32 lines
1.1 KiB
Docker

FROM node:26-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 n2-soul@9.0.9 && \
npm install -g --no-fund --no-audit --allow-scripts=better-sqlite3 better-sqlite3@12.11.1 && \
rm -rf /usr/local/lib/node_modules/n2-soul/node_modules/better-sqlite3 && \
npm install -g --no-fund --no-audit --allow-scripts=opencode-ai opencode-ai@1.17.20 && \
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"]