fix: improve npm
perso/opencode/pipeline/head This commit looks good

This commit is contained in:
Julien Cabillot
2026-05-26 12:04:50 -04:00
parent 970a53c616
commit 9bcbc04e73
+11 -8
View File
@@ -1,17 +1,20 @@
FROM node:24-trixie
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y --no-install-recommends ca-certificates && \
rm -rf /var/lib/apt/lists/*
ENV NPM_CONFIG_UPDATE_NOTIFIER=false \
NPM_CONFIG_LOGLEVEL=warn \
NODE_ENV=production
RUN set -eux; \
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 && \
npm install -g opencode-ai n2-soul@9.0.9 && \
chown -R 1000:1000 /usr/local/lib/node_modules/n2-soul/ && \
npm cache clean --force
npm update -g --no-fund --no-audit && \
npm install -g --no-fund --no-audit opencode-ai 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.35.3 /bin/kubectl /usr/local/bin/kubectl